Skip to content

Commit

Permalink
fix(lib): check/sanitize generator_args value before using it
Browse files Browse the repository at this point in the history
This avoids crashing if `NULL` (==empty string) was passed as value.
For details see #254 (comment)
  • Loading branch information
OverOrion committed Oct 16, 2024
1 parent f074c0f commit f43071f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cfg-block-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ _report_generator_args(gpointer key, gpointer value, gpointer user_data)
{
GString *result = (GString *) user_data;
g_string_append_printf(result, "## %s=", (gchar *) key);
value = value ? : "";
for (const gchar *c = (const gchar *) value; *c; c++)
{
if (*c == '\n' && *(c + 1))
Expand Down

0 comments on commit f43071f

Please sign in to comment.