Commit 5ea38976 authored by David Zeuthen's avatar David Zeuthen
Browse files

use strlen to avoid writing garbage at the end of the test auth file

While this seems like a grave bug it is not. First, this only affects
the test cases and the file is guaranteed to be zero terminated before
the garbage anyway.
parent c11ea1f0
......@@ -1227,7 +1227,7 @@ _run_test (void)
test_pu2_lib, sizeof (test_pu2_lib) - 1))
goto out;
if (!kit_file_set_contents (TEST_DATA_DIR "authdb-test/run/PolicyKit/user-pu3.auths", 0644,
test_pu3_run, sizeof (test_pu3_run) - 1))
test_pu3_run, strlen (test_pu3_run)))
goto out;
if (!kit_file_set_contents (TEST_DATA_DIR "authdb-test/lib/PolicyKit/user-pu3.auths", 0644,
test_pu3_lib, sizeof (test_pu3_lib) - 1))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment