read_req needs a null buffer byte

This commit is contained in:
Kelvin Sherlock 2014-09-05 21:35:19 -04:00
parent 941c324744
commit e8987d0cc4
1 changed files with 2 additions and 1 deletions

3
smb.c
View File

@ -949,11 +949,12 @@ static int open_and_read(Word ipid, const uint16_t *path)
uint32_t length = 0;
uint32_t status;
static uint32_t NullByte = 0;
read_req.length = 1024; // 1k
read_req.offset[0] = offset;
write_message(ipid, &read_req, sizeof(read_req), NULL, 0);
write_message(ipid, &read_req, sizeof(read_req), &NullByte, 1);
// will return status_eof_error for eof...
h = read_response(ipid, SMB2_READ);