plan9fox/sys
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
..
doc closed spew branch 2016-04-28 20:52:36 +02:00
games/lib fortunes: does that me a dipshit 2016-10-16 14:16:17 -04:00
include ape/libsec: add secp384r1 curve parameters for tls 2016-10-30 20:32:03 +01:00
lib kernel/qio: get rid of unused qcopycnt debug variable 2016-11-12 16:05:00 +01:00
man srv(4): add SOURCE for srvtls 2016-11-08 02:10:47 +01:00
src stdio: fix sclose() buffer overrun when terminating string, realloc() error handling (thanks porlock) 2016-11-27 21:20:27 +01:00