diff options
author | Gerald Carter <jerry@samba.org> | 2005-08-05 00:58:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:25 -0500 |
commit | ac42cd59f27de7d753fafd12b4c667073b8758c1 (patch) | |
tree | 886ef87906eea385387b31a76b0f2745b499af76 /source3/registry | |
parent | 777422836ccfd3f2cafa19537534b970bc96fc2b (diff) | |
download | samba-ac42cd59f27de7d753fafd12b4c667073b8758c1.tar.gz samba-ac42cd59f27de7d753fafd12b4c667073b8758c1.tar.xz samba-ac42cd59f27de7d753fafd12b4c667073b8758c1.zip |
r9086: * fix invalid read in parse_spoolss when writing a devmode to
the wire
* fix dup_a_regval() when size is 0
* ensure we pass a pstring to unlink_internals (fixes delete_driver
code)
(This used to be commit 353e63ff421c564a1b7c7cfe95982f31c871a227)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_objects.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index d6482e698b0..b5753fc6885 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -194,13 +194,18 @@ REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val ) /* copy all the non-pointer initial data */ memcpy( copy, val, sizeof(REGISTRY_VALUE) ); - if ( val->data_p ) + + copy->size = 0; + copy->data_p = NULL; + + if ( val->data_p && val->size ) { if ( !(copy->data_p = memdup( val->data_p, val->size )) ) { DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n", val->size)); SAFE_FREE( copy ); } + copy->size = val->size; } return copy; |