diff options
author | Andreas Schneider <asn@samba.org> | 2010-04-16 11:04:27 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2010-04-16 15:17:59 +0200 |
commit | 4567bf9df53e62c0f30279235d56d13cb38de190 (patch) | |
tree | d784d9a9c5aeadd5c83d9f7864cff1e207fce960 | |
parent | eef184301adccb141cc0da4cee960a60ae38b569 (diff) | |
download | samba-4567bf9df53e62c0f30279235d56d13cb38de190.tar.gz samba-4567bf9df53e62c0f30279235d56d13cb38de190.tar.bz2 samba-4567bf9df53e62c0f30279235d56d13cb38de190.zip |
s3-winreg_nt: Fixed QueryValue with data=NULL to get the length.
-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; } |