projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32e95f9
)
Fix potential memory overrun...
author
Eric Andersen
<andersen@codepoet.org>
Sat, 23 Sep 2000 19:56:46 +0000
(19:56 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Sat, 23 Sep 2000 19:56:46 +0000
(19:56 -0000)
utility.c
patch
|
blob
|
history
diff --git
a/utility.c
b/utility.c
index
719cd98
..
2ec44d9
100644
(file)
--- 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')