summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_buffer.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-04-05 17:49:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:29 -0500
commitb4c720412978c0a49e11846c7cfe553d055cca1f (patch)
tree116877fbe698b0a9babb1faacab28d1b83bc1225 /source3/rpc_parse/parse_buffer.c
parent78355805efb1e8e3ef9a5073841275ffa80da77a (diff)
downloadsamba-b4c720412978c0a49e11846c7cfe553d055cca1f.tar.gz
samba-b4c720412978c0a49e11846c7cfe553d055cca1f.tar.bz2
samba-b4c720412978c0a49e11846c7cfe553d055cca1f.zip
r6218: * fix a segv in EnumPrinters():rpc_buffer_alloc when the caller does not provide an
RPC_BUFFER in the request * add initial (but wire untested) support for RegRestoreKey() (This used to be commit 22855c7aae940cc4082c231a470f612b8fc6fa0d)
Diffstat (limited to 'source3/rpc_parse/parse_buffer.c')
-rw-r--r--source3/rpc_parse/parse_buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c
index ea72df8db4..a48d5cfa98 100644
--- a/source3/rpc_parse/parse_buffer.c
+++ b/source3/rpc_parse/parse_buffer.c
@@ -134,6 +134,11 @@ BOOL rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size)
uint32 extra_space;
uint32 old_offset;
+ /* if we don't need anything. don't do anything */
+
+ if ( buffer_size == 0x0 )
+ return True;
+
ps= &buffer->prs;
/* damn, I'm doing the reverse operation of prs_grow() :) */