Skip to content

Commit

Permalink
Initialize sbuff_tests output buffers for now
Browse files Browse the repository at this point in the history
CID #1503912, #1503930, #1503945, #1503930, #1503945

This should quiet coverity while we figure out why the
sbuff function models don't communicate to coverity that
on success, they really do write to the output sbuff.
  • Loading branch information
jejones3141 committed Jul 7, 2023
1 parent 02df5b2 commit a858953
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/util/sbuff_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void test_bstrncpy_exact(void)
{
char const in[] = "i am a test string";
char const in_long[] = "i am a longer test string";
char out[18 + 1];
char out[18 + 1] = " ";
fr_sbuff_t sbuff;
ssize_t slen;

Expand Down Expand Up @@ -227,7 +227,7 @@ static void test_bstrncpy_allowed(void)
{
char const in[] = "i am a test string";
char const in_long[] = "i am a longer test string";
char out[18 + 1];
char out[18 + 1] = " ";
fr_sbuff_t sbuff;
ssize_t slen;

Expand Down Expand Up @@ -409,7 +409,7 @@ static void test_unescape_until(void)
char const in_long[] = "i am a longer test string";
char const in_escapes[] = "i am a |t|est strin|g";
char const in_escapes_seq[] = "i |x|0am a |t|est strin|g|x20|040";
char out[18 + 1];
char out[18 + 1] = " ";
char escape_out[20 + 1];

fr_sbuff_t sbuff;
Expand Down Expand Up @@ -827,7 +827,7 @@ static void test_terminal_merge(void)
static void test_no_advance(void)
{
char const *in = "i am a test string";
char out[18 + 1];
char out[18 + 1] = " ";
fr_sbuff_t sbuff;
ssize_t slen;

Expand Down

0 comments on commit a858953

Please sign in to comment.