summaryrefslogtreecommitdiffstats
path: root/source4/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-11-09 18:40:08 +0100
committerIra Cooper <ira@samba.org>2013-11-11 21:04:08 +0100
commit4e80a30daa16a6c0d0f1f96380fb213867f3ad5f (patch)
treedc7c201283b2c3e3d9d54ffc43ec31bfcd0a6dd9 /source4/lib
parent0c8d5df5cadf59bb7833ccdd8f9c710c61d55cca (diff)
downloadsamba-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>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/tests/registry.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c
index 4e6dda448e6..ddf402c948c 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, "");