Noah Goldstein a3dd272e9c 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)
2022-01-27 16:01:04 -08:00
..
2019-02-27 13:55:45 +00:00
2019-06-12 11:42:34 +01:00
2019-06-12 11:38:52 +01:00
2019-06-12 11:38:52 +01:00
2019-02-27 13:55:45 +00:00
2019-02-27 13:55:45 +00:00
2019-02-27 13:55:45 +00:00
2019-02-27 13:55:45 +00:00