diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-14 19:47:34 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-14 19:47:34 -0400 |
commit | 91d7f4f70583e3aab13ae503bdeda97073cedb07 (patch) | |
tree | 8572a8fa782b9601f5ecf3b464fac6211c7dc394 /tests/test_utils.c | |
parent | 77b3517c8d6d01526a1c5be9109981ca269dd21f (diff) | |
download | ohmycal-91d7f4f70583e3aab13ae503bdeda97073cedb07.tar.gz |
Fix redaction code to accept NULL pointers in array
* And let the caller specify the length of the array of strings to redact.
* Redactions now occur directly on authentication strings rather than their command line arguments
Diffstat (limited to 'tests/test_utils.c')
-rw-r--r-- | tests/test_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_utils.c b/tests/test_utils.c index 94b4585..a2fa8c6 100644 --- a/tests/test_utils.c +++ b/tests/test_utils.c @@ -44,7 +44,7 @@ void test_redact_sensitive() { for (size_t i = 0; i < sizeof(data) / sizeof(*data); i++) { char *input = strdup(data[i]); char output[100] = {0}; - redact_sensitive(to_redact, input, output, sizeof(output) - 1); + redact_sensitive(to_redact, sizeof(to_redact) / sizeof(*to_redact), input, output, sizeof(output) - 1); OMC_ASSERT(strcmp(output, expected[i]) == 0, "incorrect redaction"); } } |