diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-12-30 16:36:18 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-01-02 10:19:42 -0300 |
| commit | 6f0ea84f17581d13ad668adbc181c37141d389b8 (patch) | |
| tree | 01ccc8d91186c45eb27bfc87a4fc8cfb224c2577 /assert/assert-perr.c | |
| parent | 37d0a3e55a0d92eaf5c7892eb49abfc041eb0b65 (diff) | |
| download | glibc-6f0ea84f17581d13ad668adbc181c37141d389b8.tar.xz glibc-6f0ea84f17581d13ad668adbc181c37141d389b8.zip | |
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>
Diffstat (limited to 'assert/assert-perr.c')
| -rw-r--r-- | assert/assert-perr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/assert/assert-perr.c b/assert/assert-perr.c index 80cae4d00d..83f0b3a76f 100644 --- a/assert/assert-perr.c +++ b/assert/assert-perr.c @@ -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) |
