summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-02 15:28:30 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-09-02 23:06:48 +0200
commit198b73d12ce36256fb7db85a256920d536b20a72 (patch)
tree9d480276e491fe12c5c008b42df0a11c21565f1d
parent82a2168e61cfb643efc36ecc726828ff0da37f49 (diff)
downloadcurl-198b73d12ce36256fb7db85a256920d536b20a72.tar.gz
smb: init *msg to NULL in smb_send_and_recv()
... it might otherwise return OK from this function leaving that pointer uninitialized. Bug: https://crbug.com/oss-fuzz/16907 Closes #4286
-rw-r--r--lib/smb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/smb.c b/lib/smb.c
index 2703520a6..f66c05ca4 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -606,6 +606,7 @@ static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg)
{
struct smb_conn *smbc = &conn->proto.smbc;
CURLcode result;
+ *msg = NULL; /* if it returns early */
/* Check if there is data in the transfer buffer */
if(!smbc->send_size && smbc->upload_size) {