From: Günther Deschner Date: Tue, 24 Jul 2007 09:42:15 +0000 (+0000) Subject: r24023: Correctly support REG_BINARY in registry_push_value() and X-Git-Tag: samba-4.0.0alpha6~801^2~5262 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e14d97bd101e03280c8fc97cf38dfc9b10b94677;p=thirdparty%2Fsamba.git r24023: Correctly support REG_BINARY in registry_push_value() and registry_pull_value(). Guenther (This used to be commit 6a3c44fd99c91beddd9d6a04a30c35d429d0b9a5) --- diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c index 0a6fdffd967..dcf45f3c613 100644 --- a/source3/lib/util_reg_api.c +++ b/source3/lib/util_reg_api.c @@ -107,8 +107,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx, } break; case REG_BINARY: - value->v.binary.data = talloc_move(value, &data); - value->v.binary.length = length; + value->v.binary = data_blob_talloc(mem_ctx, data, length); break; default: err = WERR_INVALID_PARAM; @@ -148,6 +147,11 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx, } break; } + case REG_BINARY: + *presult = data_blob_talloc(mem_ctx, + value->v.binary.data, + value->v.binary.length); + break; default: return WERR_INVALID_PARAM; }