From 42ed88e70a7e6c3eeca2e624561964dab235f300 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 May 2015 16:18:36 +0200 Subject: curl: fix potential NULL dereference Coverity CID 1299428: Dereference after null check (FORWARD_NULL) --- src/tool_operate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_operate.c b/src/tool_operate.c index 5f7b79211..4c3ed077b 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) -- cgit v1.2.3