Fix uninitialized variable in assert_perror (bug 22761)

This commit is contained in:
Andreas Schwab 2018-01-31 10:52:14 +01:00
parent 9fdb340e64
commit f649a1b8b0
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-02-05 Andreas Schwab <schwab@suse.de>
[BZ #22761]
* assert/assert-perr.c (__assert_perror_fail): Append %n to format
string.
2018-02-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* stdlib/test-atexit-race-common.c [!defined PTHREAD_STACK_MIN]: Do

View File

@ -32,7 +32,7 @@ __assert_perror_fail (int errnum,
char errbuf[1024];
char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
__assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
__assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n%n"),
e, file, line, function);
}
libc_hidden_def (__assert_perror_fail)