aboutsummaryrefslogtreecommitdiff
path: root/malloc/alloc_buffer_alloc_array.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-11 15:24:41 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-11-22 14:24:26 +0000
commit1fb0a3690270bcf3e5eb9d978bf050bfe1261c93 (patch)
tree1bc817c67b38fc7f635a85df9a088ab8bcc85813 /malloc/alloc_buffer_alloc_array.c
parent5aa16bb318c542cc9a2a5b48cf90b5dd8f0873ec (diff)
downloadglibc-1fb0a3690270bcf3e5eb9d978bf050bfe1261c93.tar.xz
glibc-1fb0a3690270bcf3e5eb9d978bf050bfe1261c93.zip
Fix OOB read in stdlib thousand grouping parsing [BZ #29727]
__correctly_grouped_prefixmb only worked with thousands_len == 1, otherwise it read past the end of cp or thousands. This affects scanf formats like %'d, %'f and the internal but exposed __strto{l,ul,f,d,..}_internal with grouping flag set and an LC_NUMERIC locale where thousands_len > 1. Avoid OOB access by considering thousands_len when initializing cp. This fixes bug 29727. Found by the morello port with strict bounds checking where FAIL: stdlib/tst-strtod4 FAIL: stdlib/tst-strtod5i crashed using a locale with thousands_len==3.
Diffstat (limited to 'malloc/alloc_buffer_alloc_array.c')
0 files changed, 0 insertions, 0 deletions