diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-25 16:33:24 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-30 13:51:41 -0300 |
commit | eeb7b079d5d8785e760ca08c3692ffa579bbb737 (patch) | |
tree | c197ad057102d5f25a97fd0ba2e7424657076e1b /stdio-common/tst-printf-format-vd.h | |
parent | 681a24ae4d0cb8ed92de98b4da660308840b09ba (diff) | |
download | glibc-eeb7b079d5d8785e760ca08c3692ffa579bbb737.zip glibc-eeb7b079d5d8785e760ca08c3692ffa579bbb737.tar.gz glibc-eeb7b079d5d8785e760ca08c3692ffa579bbb737.tar.bz2 |
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>
Diffstat (limited to 'stdio-common/tst-printf-format-vd.h')
0 files changed, 0 insertions, 0 deletions