plan9fox/sys/src/ape
cinap_lenrek 6d42467411 stdio: fix sclose() buffer overrun when terminating string, realloc() error handling (thanks porlock)
theres a bug is in sclose() where it doesnt check if wp is beyond
the buffer. also wp was not updated after realloc().

bug was reported by porlock on 9fans:

Plan 9's implementation of the standard C functions snprintf and
vsnprintf have a buffer overrun bug.

If the buffer length equals the output length (without the terminating
null), then one too many characters is written to the buffer.

For example,
              snprintf(buf, 4, "ABCD");

will write 5 characters to buf.
2016-11-27 21:20:27 +01:00
..
9src Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
cmd expr: fix missing type declarations for match(), which broke on amd64 as pointers dont fit into a long 2014-07-12 03:02:21 +02:00
lib stdio: fix sclose() buffer overrun when terminating string, realloc() error handling (thanks porlock) 2016-11-27 21:20:27 +01:00
config Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mkfile ape/mkfile: work arround fake "command line arguments" rule matching 2012-08-08 21:36:42 +02:00