diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-12-25 23:59:31 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-26 13:23:19 +0100 |
commit | 44a504e5e49dbfab6b3795471bef2cb337d3de49 (patch) | |
tree | 330988073c7fbf3842fc08717a50b64aabecfcd9 /src | |
parent | aba01da6390894c9e7ebb6691da544bc01b6324d (diff) | |
download | curl-44a504e5e49dbfab6b3795471bef2cb337d3de49.tar.gz |
writeout: fix NULL dereference for "this url"
Detected by torture test 1029
Follow-up to 7a90ddf88f5a
Closes #6374
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_writeout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tool_writeout.c b/src/tool_writeout.c index 8b465db2d..9ce0a997e 100644 --- a/src/tool_writeout.c +++ b/src/tool_writeout.c @@ -141,7 +141,8 @@ void ourWriteOut(CURL *curl, struct per_transfer *per, const char *writeinfo, curl_easy_strerror(result), stream); break; case VAR_INPUT_URL: - fputs(per->this_url, stream); + if(per->this_url) + fputs(per->this_url, stream); break; case VAR_URLNUM: fprintf(stream, "%u", per->urlnum); |