summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/tests/registry.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c
index ddf402c948..0c3c395e65 100644
--- a/source4/lib/registry/tests/registry.c
+++ b/source4/lib/registry/tests/registry.c
@@ -449,14 +449,15 @@ static bool test_get_value(struct torture_context *tctx, void *_data)
torture_assert_int_equal(tctx, REG_DWORD, type, "value type");
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_key_get_value_by_name(tctx, subkey, "", &type,
&data);
torture_assert_werr_ok(tctx, error, "getting default value");
torture_assert_int_equal(tctx, REG_SZ, type, "value type ok");
- torture_assert_int_equal(tctx, sizeof(data_val), data.length, "value length ok");
+ torture_assert_int_equal(tctx, strlen(data_val), data.length, "value length ok");
torture_assert_str_equal(tctx, data_val, (char *)data.data, "value ok");
return true;