From 855d12e56759c39dc80624fcd1096ee4f1f55d81 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 26 Sep 2006 22:03:52 +0000 Subject: [PATCH] r18932: In RegEnumvalue() and RegQueryValue(), the output buffer size must match the real value of the data. (This used to be commit e11108024a049f6a62d6c170296ee9877200a0c0) --- source3/rpc_server/srv_winreg_nt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c index 7adc29ec0af..a90e9e2c77c 100644 --- a/source3/rpc_server/srv_winreg_nt.c +++ b/source3/rpc_server/srv_winreg_nt.c @@ -479,6 +479,8 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct policy_handle *handle, struct memcpy( data, regval_data_p(val), *value_length ); status = WERR_OK; } + + *data_size = *value_length; } TALLOC_FREE( regvals ); @@ -626,6 +628,8 @@ WERROR _winreg_EnumValue(pipes_struct *p, struct policy_handle *handle, uint32_t status = WERR_OK; } + *data_size = *value_length; + done: free_registry_value( val );