git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28901ac
)
s3: Turn some SMB_ASSERTS into proper return
author
Volker Lendecke
<vl@samba.org>
Fri, 24 Feb 2012 15:02:02 +0000
(16:02 +0100)
committer
Volker Lendecke
<vl@samba.org>
Fri, 24 Feb 2012 15:34:34 +0000
(16:34 +0100)
We deal with the error properly further up
source3/smbd/process.c
patch
|
blob
|
history
diff --git
a/source3/smbd/process.c
b/source3/smbd/process.c
index 06f3e06be13715ee901f9760fb10820575d74a69..3214cbae0ceb46b5195cb2c62f69dbabb1165480 100644
(file)
--- a/
source3/smbd/process.c
+++ b/
source3/smbd/process.c
@@
-1745,7
+1745,9
@@
static bool find_andx_cmd_ofs(uint8_t *buf, size_t *pofs)
cmd = CVAL(buf, smb_com);
- SMB_ASSERT(is_andx_req(cmd));
+ if (!is_andx_req(cmd)) {
+ return false;
+ }
ofs = smb_vwv0;
@@
-1761,7
+1763,9
@@
static bool find_andx_cmd_ofs(uint8_t *buf, size_t *pofs)
*/
ofs = SVAL(buf, ofs+2) + 4 + 1;
- SMB_ASSERT(ofs+4 < talloc_get_size(buf));
+ if (ofs+4 >= talloc_get_size(buf)) {
+ return false;
+ }
}
*pofs = ofs;