diff options
author | Volker Lendecke <vl@samba.org> | 2013-11-09 18:40:08 +0100 |
---|---|---|
committer | Ira Cooper <ira@samba.org> | 2013-11-11 21:04:08 +0100 |
commit | 4e80a30daa16a6c0d0f1f96380fb213867f3ad5f (patch) | |
tree | dc7c201283b2c3e3d9d54ffc43ec31bfcd0a6dd9 | |
parent | 0c8d5df5cadf59bb7833ccdd8f9c710c61d55cca (diff) | |
download | samba-4e80a30daa16a6c0d0f1f96380fb213867f3ad5f.tar.gz samba-4e80a30daa16a6c0d0f1f96380fb213867f3ad5f.tar.xz samba-4e80a30daa16a6c0d0f1f96380fb213867f3ad5f.zip |
registry: Fix Coverity ID 1034916 Wrong sizeof argument
sizeof(data_val) is the size of the pointer. This might well be 8 bytes
where the string is only 4 bytes long
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
-rw-r--r-- | source4/lib/registry/tests/registry.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c index 4e6dda448e..ddf402c948 100644 --- a/source4/lib/registry/tests/registry.c +++ b/source4/lib/registry/tests/registry.c @@ -502,7 +502,8 @@ static bool test_del_value(struct torture_context *tctx, void *_data) "unsetting missing default value"); error = reg_val_set(subkey, "", REG_SZ, - data_blob_talloc(tctx, data_val, sizeof(data_val))); + data_blob_talloc(tctx, data_val, + strlen(data_val))); torture_assert_werr_ok(tctx, error, "set default value"); error = reg_del_value(tctx, subkey, ""); |