From a23e96316ebf5086a27365d4a9fb63b0e4533f6f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 26 Jul 2002 22:40:06 +0000 Subject: 3 things: * normalize all registry key strings before storing or looking up paths in the registry tdb * return the current buffer size for REG_INFO even when not returning actual data * fix a segfault report by metze on #samba-technical so that the user/group object picker works again (was the "ProductType" key lookup that was failing). (This used to be commit 5640e6cdb213502d95fff33e06eaeed5ce3aeb76) --- source3/rpc_parse/parse_reg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/rpc_parse') diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 83b55863eb..925d8b856e 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1118,7 +1118,8 @@ BOOL new_init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, REGISTRY_VALUE *val, NTSTATUS status) { uint32 buf_len = 0; - + BUFFER2 buf2; + if(r_r == NULL) return False; @@ -1136,6 +1137,11 @@ BOOL new_init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, buf_len = reg_init_buffer2( &r_r->uni_val, val ); } + else { + /* dummy buffer used so we can get the size */ + r_r->ptr_uni_val = 0; + buf_len = reg_init_buffer2( &buf2, val ); + } r_r->ptr_max_len = 1; r_r->buf_max_len = buf_len; -- cgit