fix swprintf internal buffer state and error handling
commit7442442ccc665641a8827177e8e7ed45bbbd6584
authorRich Felker <dalias@aerifal.cx>
Tue, 8 Nov 2016 01:39:59 +0000 (7 20:39 -0500)
committerRich Felker <dalias@aerifal.cx>
Tue, 8 Nov 2016 01:39:59 +0000 (7 20:39 -0500)
tree1131612f9a89aeb7a15f809d1b358186bb02159d
parentbc1e7731cee963e422575f81048792f4d5db9641
fix swprintf internal buffer state and error handling

the swprintf write callback never reset its buffer pointers, so after
its 256-byte buffer filled up, it would keep repeating those bytes
over and over in the output until the destination buffer filled up. it
also failed to set the error indicator for the stream on EILSEQ,
potentially allowing output to continue after the error.
src/stdio/vswprintf.c