Fix stringmatchlen() read past buffer bug

This commit is contained in:
Israel Lot
2019-03-12 18:08:01 -05:00
parent 137360651f
commit 0a967ec280
+1 -1
View File
@@ -56,7 +56,7 @@ POSIX_ONLY(#include <sys/time.h>)
int stringmatchlen(const char *pattern, int patternLen,
const char *string, int stringLen, int nocase)
{
while(patternLen) {
while (patternLen && stringLen) {
switch(pattern[0]) {
case '*':
while (pattern[1] == '*') {