projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25afd65
)
Fix bug spotted by Jean-Christphe Dubois: reserve space for null terminator.
author
Rob Landley
<rob@landley.net>
Thu, 16 Apr 2009 22:03:38 +0000
(17:03 -0500)
committer
Rob Landley
<rob@landley.net>
Thu, 16 Apr 2009 22:03:38 +0000
(17:03 -0500)
lib/lib.c
patch
|
blob
|
history
diff --git
a/lib/lib.c
b/lib/lib.c
index
ecef64d
..
e4b9d8e
100644
(file)
--- a/
lib/lib.c
+++ b/
lib/lib.c
@@
-650,7
+650,7
@@
char *get_rawline(int fd, long *plen, char end)
for (;;) {
if (1>read(fd, &c, 1)) break;
- if (!(len & 63)) buf=xrealloc(buf, len+6
4
);
+ if (!(len & 63)) buf=xrealloc(buf, len+6
5
);
if ((buf[len++]=c) == end) break;
}
if (buf) buf[len]=0;