mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
assert: Remove the use of %n from __assert_fail_base (BZ #32456)
The require size for mmap can be inferred from __vasprintf return value. It also fixes tst-assert-2 when building with --enable-fortify, where even if the format is not translated, __readonly_area fails because malloc can not be used. Checked on aarch64-linux-gnu. Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
@@ -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%n"),
|
||||
__assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
|
||||
e, file, line, function);
|
||||
}
|
||||
libc_hidden_def (__assert_perror_fail)
|
||||
|
Reference in New Issue
Block a user