From: Daniel Stenberg Date: Fri, 22 May 2015 14:18:36 +0000 (+0200) Subject: curl: fix potential NULL dereference X-Git-Tag: curl-7_43_0~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42ed88e70a7e6c3eeca2e624561964dab235f300;p=thirdparty%2Fcurl.git curl: fix potential NULL dereference Coverity CID 1299428: Dereference after null check (FORWARD_NULL) --- diff --git a/src/tool_operate.c b/src/tool_operate.c index 5f7b792118..4c3ed077b1 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1497,7 +1497,7 @@ static CURLcode operate_do(struct GlobalConfig *global, if(retry_sleep > RETRY_SLEEP_MAX) retry_sleep = RETRY_SLEEP_MAX; } - if(outs.bytes && outs.filename) { + if(outs.bytes && outs.filename && outs.stream) { /* We have written data to a output file, we truncate file */ if(!global->mute)