x86: Fix overflow bug in wcsnlen-sse4_1 and wcsnlen-avx2 [BZ #27974]
This commit fixes the bug mentioned in the previous commit. The previous implementations of wmemchr in these files relied on maxlen * sizeof(wchar_t) which was not guranteed by the standard. The new overflow tests added in the previous commit now pass (As well as all the other tests). Signed-off-by:Noah Goldstein <goldstein.w.n@gmail.com> Reviewed-by:
H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit a775a7a3)
Loading
Please register or sign in to comment