mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r2665: Ensure the UNIX info level returned enough data.
Jeremy. (This used to be commit 8a7741dddf17dca136144fb26e2d7a42d313467a)
This commit is contained in:
parent
eb9a09954b
commit
f128aa2a55
@ -205,6 +205,12 @@ BOOL cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu
|
||||
return False;
|
||||
}
|
||||
|
||||
if (data_len < 96) {
|
||||
SAFE_FREE(rdata);
|
||||
SAFE_FREE(rparam);
|
||||
return False;
|
||||
}
|
||||
|
||||
sbuf->st_size = IVAL2_TO_SMB_BIG_UINT(rdata,0); /* total size, in bytes */
|
||||
sbuf->st_blocks = IVAL2_TO_SMB_BIG_UINT(rdata,8); /* number of blocks allocated */
|
||||
sbuf->st_blocks /= STAT_ST_BLOCKSIZE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user