summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-27 13:24:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:50 -0500
commit2279881bd47e7869b3e488f85d3317dbaddbf0dd (patch)
tree11930c7dbc4bcb27a0e7083d4560107c61ffc7dd /source3/rpc_server
parentcb99b612f874bd1d88e50ff1f2c0331cd56e72ca (diff)
downloadsamba-2279881bd47e7869b3e488f85d3317dbaddbf0dd.tar.gz
samba-2279881bd47e7869b3e488f85d3317dbaddbf0dd.tar.bz2
samba-2279881bd47e7869b3e488f85d3317dbaddbf0dd.zip
r18954: Fix segv in QueryValue and Enumvalue. regedit.exe now
is happy again when creating keys and values (This used to be commit 6e9e9f8facbdd694041709e1fc6a8f824ac8c119)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_winreg_nt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index 03320b38f6..c5e4230706 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -471,7 +471,7 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct policy_handle *handle, struct
*value_length = regval_size( val );
*type = val->type;
- if ( *data_size == 0 ) {
+ if ( *data_size == 0 || !data ) {
status = WERR_OK;
} else if ( *value_length > *data_size ) {
status = WERR_MORE_DATA;
@@ -619,7 +619,7 @@ WERROR _winreg_EnumValue(pipes_struct *p, struct policy_handle *handle, uint32_t
*value_length = regval_size( val );
*type = val->type;
- if ( *data_size == 0 ) {
+ if ( *data_size == 0 || !data ) {
status = WERR_OK;
} else if ( *value_length > *data_size ) {
status = WERR_MORE_DATA;