diff options
author | John Hawthorn <john@hawthorn.email> | 2020-08-08 19:42:58 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2020-08-08 19:42:58 -0700 |
commit | 4baf608fd636624504c6a9c9389294023073ba9f (patch) | |
tree | 005ff5ea664860177310866e42553e6c153a7fff /src | |
parent | 43caa3daa912844e342fc520b4e60eb48e75c3a7 (diff) |
Check for too long haystack
Fixes #145
Diffstat (limited to 'src')
-rw-r--r-- | src/match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/match.c b/src/match.c index a0c0785..d618f0a 100644 --- a/src/match.c +++ b/src/match.c @@ -56,7 +56,7 @@ static void setup_match_struct(struct match_struct *match, const char *needle, c match->needle_len = strlen(needle); match->haystack_len = strlen(haystack); - if (match->needle_len > MATCH_MAX_LEN || match->needle_len > match->haystack_len) { + if (match->haystack_len > MATCH_MAX_LEN || match->needle_len > match->haystack_len) { return; } |