From: Eric Andersen Date: Sat, 23 Sep 2000 19:56:46 +0000 (-0000) Subject: Fix potential memory overrun... X-Git-Tag: 0_47~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=285b446d1777b9515bb83df7b18d17359f49f921;p=platform%2Fupstream%2Fbusybox.git Fix potential memory overrun... --- diff --git a/utility.c b/utility.c index 719cd98..2ec44d9 100644 --- a/utility.c +++ b/utility.c @@ -1606,7 +1606,7 @@ extern char *get_line_from_file(FILE *file) if (ch == EOF) break; /* grow the line buffer as necessary */ - if (idx > linebufsz-2) + while (idx > linebufsz-2) linebuf = xrealloc(linebuf, linebufsz += GROWBY); linebuf[idx++] = (char)ch; if ((char)ch == '\n')