diff options
-rw-r--r-- | source3/libsmb/clientgen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 92a9678de5..ef74de9f4b 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -260,7 +260,8 @@ BOOL cli_receive_smb_readX_header(struct cli_state *cli) } /* Read the rest of the data. */ - if (!cli_receive_smb_data(cli,cli->inbuf+len,total_len - len)) { + if ((total_len - len > 0) && + !cli_receive_smb_data(cli,cli->inbuf+len,total_len - len)) { goto read_err; } |