From: Tim Kientzle Date: Thu, 28 Apr 2016 05:48:20 +0000 (-0700) Subject: Issue 686: Correctly retry if the buffer needs to be grown X-Git-Tag: v3.2.0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9134c3a;p=thirdparty%2Flibarchive.git Issue 686: Correctly retry if the buffer needs to be grown --- 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';