fix (normal, narrow) printf erroneously processing %n after output errors
authorRich Felker <dalias@aerifal.cx>
Mon, 20 Mar 2023 23:07:54 +0000 (19:07 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 21 Mar 2023 13:11:17 +0000 (09:11 -0400)
unlike with wide printf variants, encoding errors are not a vector by
which this bug is reachable, and the out() helper function already
ensured that no further output could be written after an output error,
transient or otherwise. however, the %n specifier could still be
processed after an error, yielding a side effect that wrongly implied
output had succeeded.

due to buffering effects, it's still possible for %n to show output as
having "succeeded", but for it never to appear on the underlying file
due to an error at flush time. this change, however, ensures that
processing of %n does not conflict with any error which has already
been seen.


No differences found