fix writes outside buffer by ungetc after setvbuf
authorRich Felker <dalias@aerifal.cx>
Sat, 14 Jul 2018 01:56:27 +0000 (21:56 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 14 Jul 2018 01:56:27 +0000 (21:56 -0400)
commit9cad27a3dc1a4eb349b6591e4dc8cc89dce32277
tree9346b3dd848090b935d466385c006fdd86263ceb
parent062015204a192dd6ab9663abcc3171b9106d1749
fix writes outside buffer by ungetc after setvbuf

commit 0b80a7b0404b6e49b0b724e3e3fe0ed5af3b08ef, which added non-stub
setvbuf, applied the UNGET pushback adjustment to the size of the
buffer passed in, but inadvertently omitted offsetting the start by
the same amount, thereby allowing unget to clobber up to 8 bytes
before the start of the buffer. this bug was introduced in the present
release cycle; no releases are affected.
src/stdio/setvbuf.c