diff options
author | kokke <spam@rowdy.dk> | 2021-03-09 14:10:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-03-10 14:01:55 +0100 |
commit | b2d906754c3686fed0249b2dbe9f5a2a296c40e6 (patch) | |
tree | f746c3cbe613c586e78ceb0ea9d57ba1d2d67b98 /tests/libtest | |
parent | 9421eee915d7a1e438c34484b999d0964b02a038 (diff) | |
download | curl-b2d906754c3686fed0249b2dbe9f5a2a296c40e6.tar.gz |
lib1537: check ptr against NULL before dereferencing it
Fixes #6707
Closes #6708
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib1537.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libtest/lib1537.c b/tests/libtest/lib1537.c index cca3b91a4..7ba8e225b 100644 --- a/tests/libtest/lib1537.c +++ b/tests/libtest/lib1537.c @@ -47,11 +47,11 @@ int test(char *URL) /* deprecated API */ ptr = curl_escape((char *)a, asize); - printf("%s\n", ptr); if(!ptr) { res = TEST_ERR_MAJOR_BAD; goto test_cleanup; } + printf("%s\n", ptr); raw = curl_easy_unescape(NULL, ptr, (int)strlen(ptr), &outlen); printf("outlen == %d\n", outlen); |