The checks did not account for the **two byte** 16bit read so risked
reading one more byte than what actually was received.
Reported-by: Joshua Rogers
Closes #18599
break;
case SMB_DOWNLOAD:
- if(h->status || smbc->got < sizeof(struct smb_header) + 14) {
+ if(h->status || smbc->got < sizeof(struct smb_header) + 15) {
req->result = CURLE_RECV_ERROR;
next_state = SMB_CLOSE;
break;
break;
case SMB_UPLOAD:
- if(h->status || smbc->got < sizeof(struct smb_header) + 6) {
+ if(h->status || smbc->got < sizeof(struct smb_header) + 7) {
req->result = CURLE_UPLOAD_FAILED;
next_state = SMB_CLOSE;
break;