diff options
author | Rob Landley <rob@landley.net> | 2009-04-16 17:03:38 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2009-04-16 17:03:38 -0500 |
commit | d6b2613a6ea39d97599b714eb6722745c71ab957 (patch) | |
tree | 69b078a148c5d75b8d510b1fb28c78f8a908f3de /lib | |
parent | 25afd6548d9cd0ed3c9a3865c6ff73dbfd65f97d (diff) | |
download | toybox-d6b2613a6ea39d97599b714eb6722745c71ab957.tar.gz |
Fix bug spotted by Jean-Christphe Dubois: reserve space for null terminator.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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+64); + if (!(len & 63)) buf=xrealloc(buf, len+65); if ((buf[len++]=c) == end) break; } if (buf) buf[len]=0; |