about summary refs log tree commit diff
path: root/rt/tst-aio5.c
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2021-06-09 16:17:14 -0400
committerH.J. Lu <hjl.tools@gmail.com>2022-01-27 15:49:37 -0800
commita2be2c0f5d4d8cd2c6a227d60f13cc1c8eb61171 (patch)
treed2571d3cdd7dc643cec63be3bf6bfa571fb95954 /rt/tst-aio5.c
parent489006c3c50ba19ff0b8b2dcfb5f48d0327eae9c (diff)
downloadglibc-a2be2c0f5d4d8cd2c6a227d60f13cc1c8eb61171.tar.gz
glibc-a2be2c0f5d4d8cd2c6a227d60f13cc1c8eb61171.tar.xz
glibc-a2be2c0f5d4d8cd2c6a227d60f13cc1c8eb61171.zip
String: Add overflow tests for strnlen, memchr, and strncat [BZ #27974]
This commit adds tests for a bug in the wide char variant of the
functions where the implementation may assume that maxlen for wcsnlen
or n for wmemchr/strncat will not overflow when multiplied by
sizeof(wchar_t).

These tests show the following implementations failing on x86_64:

wcsnlen-sse4_1
wcsnlen-avx2

wmemchr-sse2
wmemchr-avx2

strncat would fail as well if it where on a system that prefered
either of the wcsnlen implementations that failed as it relies on
wcsnlen.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit da5a6fba0febbfc90896ce1b2eb75c6d8a88a72d)
Diffstat (limited to 'rt/tst-aio5.c')
0 files changed, 0 insertions, 0 deletions