1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

printf should return negative value on error

[BZ #11741]
Fixed bug where printf and family may return a spurious success when
printing padded formats.
This commit is contained in:
Siddhesh Poyarekar
2012-11-16 19:13:11 +05:30
parent b1848fdeec
commit 2b766585f9
8 changed files with 92 additions and 29 deletions

View File

@ -59,7 +59,7 @@ _IO_padn (fp, pad, count)
w = _IO_sputn (fp, padptr, PADSIZE);
written += w;
if (w != PADSIZE)
return written;
return w == EOF ? w : written;
}
if (i > 0)