Similiar to [BZ 27974](https://sourceware.org/bugzilla/show_bug.cgi?id=27974). The multiply of length by sizeof (wchar_t) can overflow if length is >= 2^62 which can lead to incorrect results.
For example:
#include <wchar.h> int main(int argc, char ** argv) { assert(__wcsncmp_evex(L"abc", L"abd", (1UL << 62)) != 0); assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0); }
Will fail on either assert.
Similiar to [BZ 27974](https:/ /sourceware. org/bugzilla/ show_bug. cgi?id= 27974). The multiply of length by sizeof (wchar_t) can overflow if length is >= 2^62 which can lead to incorrect results.
For example:
#include <wchar.h> __wcsncmp_ evex(L" abc", L"abd", (1UL << 62)) != 0); __wcsncmp_ avx2(L" abc", L"abd", (1UL << 62)) != 0);
int
main(int argc, char ** argv) {
assert(
assert(
}
Will fail on either assert.