summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-06 23:43:21 +0000
committerTim Potter <tpot@samba.org>2002-11-06 23:43:21 +0000
commit1ae7b1395f59e5aa8988ffeed2dfe1895eba8187 (patch)
tree622fe56149c336f2b470e737070cfad674f253aa /source3/rpc_parse
parent904649b6f08996cb61cd045e9c131bbae499ed44 (diff)
downloadsamba-1ae7b1395f59e5aa8988ffeed2dfe1895eba8187.tar.gz
samba-1ae7b1395f59e5aa8988ffeed2dfe1895eba8187.tar.bz2
samba-1ae7b1395f59e5aa8988ffeed2dfe1895eba8187.zip
For a BUFFER5, don't parse the buffer if the buffer length is zero.
(This used to be commit 28871bb6969ca70aabcc622410dd1fc5addcceca)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 3dd9c3bc2a..c20fb85582 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -685,9 +685,10 @@ BOOL smb_io_buffer5(char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
if(!prs_uint32("buf_len", ps, depth, &buf5->buf_len))
return False;
-
- if(!prs_buffer5(True, "buffer" , ps, depth, buf5))
- return False;
+ if(buf5->buf_len) {
+ if(!prs_buffer5(True, "buffer" , ps, depth, buf5))
+ return False;
+ }
return True;
}