1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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
This commit is contained in:
Daniel Stenberg 2019-09-02 15:28:30 +02:00
parent 82a2168e61
commit 198b73d12c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -606,6 +606,7 @@ static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg)
{ {
struct smb_conn *smbc = &conn->proto.smbc; struct smb_conn *smbc = &conn->proto.smbc;
CURLcode result; CURLcode result;
*msg = NULL; /* if it returns early */
/* Check if there is data in the transfer buffer */ /* Check if there is data in the transfer buffer */
if(!smbc->send_size && smbc->upload_size) { if(!smbc->send_size && smbc->upload_size) {