git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb9a099
)
r2665: Ensure the UNIX info level returned enough data.
author
Jeremy Allison
<jra@samba.org>
Sun, 26 Sep 2004 22:16:00 +0000
(22:16 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 15:52:49 +0000
(10:52 -0500)
Jeremy.
(This used to be commit
8a7741dddf17dca136144fb26e2d7a42d313467a
)
source3/libsmb/clifile.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/clifile.c
b/source3/libsmb/clifile.c
index d3022069491d99ec8333987759c19d432133bee6..144fc4a0c853fd8dce5bcd2792719ff3c9531b10 100644
(file)
--- a/
source3/libsmb/clifile.c
+++ b/
source3/libsmb/clifile.c
@@
-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;