summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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;