mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 18:40:58 +01:00
a768953760
We can't search for a larger needle inside of a smaller haystack, and unsigned integer subtraction tends to result in very large numbers rather than small ones. Add a check for this case and abort out immediately. Also add a test case (lifted directly from the docs) that demonstrates the problem. Issue discovered and tracked down by Milan Bouchet-Valat