mirror of
https://github.com/curl/curl.git
synced 2025-04-18 16:30:45 +08:00
lib1537: check ptr against NULL before dereferencing it
Fixes #6707 Closes #6708
This commit is contained in:
parent
9421eee915
commit
b2d906754c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user