summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2021-03-09 14:25:04 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-03-10 14:03:57 +0100
commit4088b25b337d67fa34e96e90cf98dd3865ce2d33 (patch)
tree68dce92f9ab6db4957d7c21b6310cc12ff4cb111
parentb2d906754c3686fed0249b2dbe9f5a2a296c40e6 (diff)
downloadcurl-4088b25b337d67fa34e96e90cf98dd3865ce2d33.tar.gz
lib1536: check ptr against NULL before dereferencing it
Closes #6710
-rw-r--r--tests/libtest/lib1536.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libtest/lib1536.c b/tests/libtest/lib1536.c
index 7a1aa9bfa..6fe3bc787 100644
--- a/tests/libtest/lib1536.c
+++ b/tests/libtest/lib1536.c
@@ -69,7 +69,7 @@ int test(char *URL)
__FILE__, __LINE__, res, curl_easy_strerror(res));
goto test_cleanup;
}
- if(memcmp(scheme, "HTTP", 5) != 0) {
+ if(scheme == NULL || memcmp(scheme, "HTTP", 5) != 0) {
fprintf(stderr, "%s:%d scheme of http resource is incorrect; "
"expected 'HTTP' but is %s\n",
__FILE__, __LINE__,