diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-09-23 19:56:46 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-09-23 19:56:46 +0000 |
commit | 285b446d1777b9515bb83df7b18d17359f49f921 (patch) | |
tree | a770146edff347eb415d04ab63c5c8d4a2e28de0 | |
parent | 32e95f988d3a395de375296ac4f955cc330d39bf (diff) | |
download | busybox-285b446d1777b9515bb83df7b18d17359f49f921.tar.gz |
Fix potential memory overrun...
-rw-r--r-- | utility.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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') |