diff options
Diffstat (limited to 'source3/rpc_parse/parse_reg.c')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |