diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-08 06:16:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:11:05 -0500 |
commit | a3586ff60ccb2c2bd491dd08a67fb0cc22842f7a (patch) | |
tree | 849399d171eab894cc30cd0fd32c8a30bab2ee1c | |
parent | 9e65a2cb984988d04acf879dd3fc2d3e157f20df (diff) | |
download | samba-a3586ff60ccb2c2bd491dd08a67fb0cc22842f7a.tar.gz samba-a3586ff60ccb2c2bd491dd08a67fb0cc22842f7a.tar.bz2 samba-a3586ff60ccb2c2bd491dd08a67fb0cc22842f7a.zip |
r14014: Coverity paranoia. Shut it up by making the guarentee
in the code explicit - but this was a false positive (CID #16).
Jeremy.
(This used to be commit 43a0e869f2aee9b4e22d0d7fc92051e82f7536ad)
-rw-r--r-- | source3/rpc_parse/parse_buffer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c index b8b2c2e9ea..52117dc44b 100644 --- a/source3/rpc_parse/parse_buffer.c +++ b/source3/rpc_parse/parse_buffer.c @@ -47,7 +47,7 @@ BOOL prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buff { prs_debug(ps, depth, desc, "prs_rpcbuffer"); depth++; - + /* reading */ if (UNMARSHALLING(ps)) { buffer->size=0; @@ -135,7 +135,12 @@ BOOL prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **b } return True; } - + + /* Coverity paranoia. Buffer must be valid. */ + if (!*buffer) { + return False; + } + return prs_rpcbuffer( desc, ps, depth, *buffer); } |