diff options
-rw-r--r-- | source3/rpc_server/srv_winreg_nt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c index 051930110e..e64118b744 100644 --- a/source3/rpc_server/srv_winreg_nt.c +++ b/source3/rpc_server/srv_winreg_nt.c @@ -320,7 +320,9 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r) } else { *r->out.data_length = outbuf_size; *r->out.data_size = outbuf_size; - memcpy(r->out.data, outbuf, outbuf_size); + if (r->out.data) { + memcpy(r->out.data, outbuf, outbuf_size); + } status = WERR_OK; } |