From 2b9f2b26d466ce4ddd1c6996eea45f043f46f25d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 25 Jun 2012 11:18:14 +0000 Subject: [PATCH] -boundscheck --- src/regex/regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex/regex.c b/src/regex/regex.c index b0fb4c175..99a9fd3b9 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); } -- 2.25.1