Skip to content
Permalink
Browse files

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
  • Loading branch information...
bagder committed Sep 2, 2019
1 parent 82a2168 commit 198b73d12ce36256fb7db85a256920d536b20a72
Showing with 1 addition and 0 deletions.
  1. +1 −0 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) {

0 comments on commit 198b73d

Please sign in to comment.
You can’t perform that action at this time.