summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 8d68f0bb1..36cbc43d3 100644
--- a/src/util.c
+++ b/src/util.c
@@ -84,7 +84,7 @@ int stringmatchlen(const char *pattern, int patternLen,
}
match = 0;
while(1) {
- if (pattern[0] == '\\') {
+ if (pattern[0] == '\\' && patternLen >= 2) {
pattern++;
patternLen--;
if (pattern[0] == string[0])