From a3586ff60ccb2c2bd491dd08a67fb0cc22842f7a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 Mar 2006 06:16:54 +0000 Subject: 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) --- source3/rpc_parse/parse_buffer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3') 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); } -- cgit