1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-02 20:42:29 +03:00
Files
glibc/sysdeps
Adhemerval Zanella eeb7b079d5 stdlib: Fix __libc_message_impl iovec size (BZ 32947)
The iovec size should account for all substrings between each conversion
specification.  For the format:

  "abc %s efg"

The list of substrings are:

  ["abc ", arg, " efg]

which is 2 times the number of maximum arguments *plus* one.

This issue triggered 'out of bounds' errors by stdlib/tst-bz20544 when
glibc is built with experimental UBSAN support [1].

Besides adjusting the iovec size, a new runtime and check is added to
avoid wrong __libc_message_impl usage.

Checked on x86_64-linux-gnu.

[1] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/ubsan-undef

Co-authored-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-06-30 13:51:41 -03:00
..
2025-03-06 02:28:35 +01:00
2025-06-02 13:32:19 -03:00
2025-06-25 15:05:30 -03:00
2025-06-19 05:46:31 +08:00