From ea81e7d8c61b6dc8abe02309708aa895555be60c Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 22 Apr 2025 14:01:05 -0300 Subject: [PATCH] stdlib: Fix __libc_message_impl iovec size The ubsan triggers an array item access error with stdlib/tst-bz20544. --- sysdeps/posix/libc_fatal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c index d90cc6c681..25ef20cfc1 100644 --- a/sysdeps/posix/libc_fatal.c +++ b/sysdeps/posix/libc_fatal.c @@ -61,7 +61,7 @@ __libc_message_impl (const char *fmt, ...) if (fd == -1) fd = STDERR_FILENO; - struct iovec iov[LIBC_MESSAGE_MAX_ARGS * 2 - 1]; + struct iovec iov[LIBC_MESSAGE_MAX_ARGS * 2 + 1]; int iovcnt = 0; ssize_t total = 0; -- 2.47.2