summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-24 16:02:02 +0100
committerVolker Lendecke <vl@samba.org>2012-02-24 16:34:34 +0100
commit947a8bc44afc47961e2477ce0b7d8a16573b0f97 (patch)
tree74befbf24f0f5f46b8d5eb91bc47d5c86c003fc6 /source3/smbd
parent28901acd27bb7b1bfc19ad1a7e0167d55124682c (diff)
downloadsamba-947a8bc44afc47961e2477ce0b7d8a16573b0f97.tar.gz
samba-947a8bc44afc47961e2477ce0b7d8a16573b0f97.tar.bz2
samba-947a8bc44afc47961e2477ce0b7d8a16573b0f97.zip
s3: Turn some SMB_ASSERTS into proper return
We deal with the error properly further up
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 06f3e06be1..3214cbae0c 100644
--- 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;