Skip to content
Commit 0a888ff9 authored by Noah Goldstein's avatar Noah Goldstein Committed by Sunil K Pandey
Browse files

x86: Fix wcsnlen-avx2 page cross length comparison [BZ #29591]

Previous implementation was adjusting length (rsi) to match
bytes (eax), but since there is no bound to length this can cause
overflow.

Fix is to just convert the byte-count (eax) to length by dividing by
sizeof (wchar_t) before the comparison.

Full check passes on x86-64 and build succeeds w/ and w/o multiarch.

(cherry picked from commit b0969fa5)
parent 0c9137a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment