diff options
-rw-r--r-- | src/regex/regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex/regex.c b/src/regex/regex.c index b0fb4c1752..99a9fd3b92 100644 --- a/src/regex/regex.c +++ b/src/regex/regex.c @@ -931,7 +931,7 @@ remove_epsilon (const char *str) static int strkcmp (const char *str1, const char *str2, size_t k) { - if (NULL == str1 || NULL == str2) + if ( (NULL == str1) || (NULL == str2) || (strlen(str1) < k) ) return -1; return strcmp (&str1[k], str2); } |