lifecycle: Use snprintf() in favor of sprintf()

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-10-06 03:25:23 +02:00
parent 99b0d67b8e
commit 1a2298a759

View file

@ -131,7 +131,7 @@ append_to_buffer(char **buffer, size_t *buffer_len, char **end, const char *valu
} }
/* Append value to buffer */ /* Append value to buffer */
size_t printed = sprintf (*end, "%s ", value); size_t printed = snprintf (*end, value_len + 2, "%s ", value);
if (printed < value_len + 1) if (printed < value_len + 1)
/* Here be dragons */ /* Here be dragons */
return false; return false;