Skip to content
Commit cf11e74b authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

wcsmbs: Ensure wcstr worst-case linear execution time (BZ 23865)



It uses the same two-way algorithm used on strstr, strcasestr, and
memmem.  Different than strstr, neither the "shift table" optimization
nor the self-adapting filtering check is used because it would result in
a too-large shift table (and it also simplifies the implementation bit).

Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Reviewed-by: default avatarDJ Delorie <dj@redhat.com>
parent 4b717562
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