From 44a504e5e49dbfab6b3795471bef2cb337d3de49 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 Dec 2020 23:59:31 +0100 Subject: writeout: fix NULL dereference for "this url" Detected by torture test 1029 Follow-up to 7a90ddf88f5a Closes #6374 --- src/tool_writeout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1