summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-08-30 10:47:34 +0000
committerGerald Carter <jerry@samba.org>2002-08-30 10:47:34 +0000
commitde3d0310e2622c068d6ae6fb4698752128068924 (patch)
tree4c07f687a778ec3b857464291caf6077df18cfb3 /source3/rpc_parse
parentcfb5e91178eb8befdb00780a819f9c5cd3eee8e4 (diff)
downloadsamba-de3d0310e2622c068d6ae6fb4698752128068924.tar.gz
samba-de3d0310e2622c068d6ae6fb4698752128068924.tar.bz2
samba-de3d0310e2622c068d6ae6fb4698752128068924.zip
merge of phant0m key fix from APP_HEAD
(This used to be commit cb13d334a53f27713665570d85607d57eb407f9f)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_reg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index 365ad2dc70..1387aaf6ea 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -39,6 +39,7 @@ static uint32 reg_init_buffer2( BUFFER2 *buf2, REGISTRY_VALUE *val )
char *string;
char *list = NULL;
char *list2 = NULL;
+ int len = 0;
if ( !buf2 || !val )
return 0;
@@ -48,10 +49,13 @@ static uint32 reg_init_buffer2( BUFFER2 *buf2, REGISTRY_VALUE *val )
switch (val->type )
{
case REG_SZ:
- string = (char*)val->data_p;
+ string = (char*)regval_data_p( val );
DEBUG(10,("reg_init_buffer2: REG_SZ string => [%s]\n", string));
- init_unistr2( &unistr, (char*)val->data_p, strlen((char*)val->data_p)+1 );
+ if ( string )
+ len = strlen(string)+1;
+
+ init_unistr2( &unistr, (char*)val->data_p, len );
init_buffer2( buf2, (char*)unistr.buffer, unistr.uni_str_len*2 );
real_size = unistr.uni_str_len*2;
break;