aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/strequal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/strequal.c b/lib/strequal.c
index 6859e26bd..df5d4f14b 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -63,6 +63,9 @@ int curl_strnequal(const char *first, const char *second, size_t max)
first++;
second++;
}
+ if(0 == max)
+ return 1; /* they are equal this far */
+
return toupper(*first) == toupper(*second);
#endif
}