diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-02 22:04:07 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-02 22:04:07 (EST) |
commit | b65cb493330307f8028e7e8ae88f312cb47842b3 (patch) | |
tree | 6ba5244c80922bf87e926a7325a3d758a63cc5c7 /libbb/xfuncs.c | |
parent | b5e40ef6ba305d7a465062dd49939b96529436c3 (diff) |
Fix truncation problem when reading in long lines. Found by Koen Kooi.
After realloc()ing a second time for long lines, buflen was one byte short.
It did not take into account buf being pointed at the NULL terminator, before
the end of the buffer. So when fgets() was next called, it inserted its NULL
terminator one byte earlier than expected. The earlier terminator was not
overwritten by subsequent iterations as it should have been.
git-svn-id: http://opkg.googlecode.com/svn/trunk@438 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb/xfuncs.c')
0 files changed, 0 insertions, 0 deletions