From b4c720412978c0a49e11846c7cfe553d055cca1f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 5 Apr 2005 17:49:16 +0000 Subject: 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) --- source3/rpc_parse/parse_buffer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/rpc_parse/parse_buffer.c') 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() :) */ -- cgit