diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-20 22:13:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:21 -0500 |
commit | ef34e3336b6f4a84fb0d0a121c1eb5c54165b457 (patch) | |
tree | b870235c71a983641da66a47d52beef9c8447dfc | |
parent | 0b8bc68b50e1cf75686563375bd63c38aba197cb (diff) | |
download | samba-ef34e3336b6f4a84fb0d0a121c1eb5c54165b457.tar.gz samba-ef34e3336b6f4a84fb0d0a121c1eb5c54165b457.tar.bz2 samba-ef34e3336b6f4a84fb0d0a121c1eb5c54165b457.zip |
r7789: fix overparanoid assert() call when checking spolss buffer pointers
(This used to be commit e81e6e653aecdd0e4cfd2ea7ced16070bc376292)
-rw-r--r-- | source3/rpc_parse/parse_buffer.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c index a48d5cfa98..ff2a7cc2f6 100644 --- a/source3/rpc_parse/parse_buffer.c +++ b/source3/rpc_parse/parse_buffer.c @@ -173,14 +173,20 @@ BOOL rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size) void rpcbuf_move(RPC_BUFFER *src, RPC_BUFFER **dest) { - SMB_ASSERT( src != NULL ); + if ( !src ) { + *dest = NULL; + return; + } + + prs_switch_type( &src->prs, MARSHALL ); - prs_switch_type(&src->prs, MARSHALL); - if(!prs_set_offset(&src->prs, 0)) + if ( !prs_set_offset(&src->prs, 0) ) return; - prs_force_dynamic(&src->prs); - prs_mem_clear(&src->prs); - *dest=src; + + prs_force_dynamic( &src->prs ); + prs_mem_clear( &src->prs ); + + *dest = src; } /******************************************************************* |