From 9134c3a4a93705dda15e7f15d66d923da037057d Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Wed, 27 Apr 2016 22:48:20 -0700 Subject: [PATCH] Issue 686: Correctly retry if the buffer needs to be grown --- libarchive/archive_string.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c index 3d4be8259..282c58e1e 100644 --- a/libarchive/archive_string.c +++ b/libarchive/archive_string.c @@ -737,7 +737,8 @@ archive_string_append_from_wcs_in_codepage(struct archive_string *as, } if (count == 0) ret = -1; - } while (0); + break; + } while (1); } as->length += count; as->s[as->length] = '\0'; -- 2.47.2