mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
wildcard.c: allow the matched string to be a ptrlen.
The main wildcard matching code now doesn't depend on having a NUL terminator in the string to be matched; instead it works with a pair of pointers, one working along the string as we match, and the other identifying the end of the string, and tests that p < target_end before dereferencing p. User-facing entry points now allow you to pass either an ordinary ASCIZ const char * or a ptrlen, and set up target_end accordingly. For the moment, the _wildcard_ parameter still has to be an ordinary null-terminated string, but who knows, maybe that will have to change too at some later point.
This commit is contained in:
Reference in New Issue
Block a user