Skip to content

Commit dd18cea

Browse files
authored
out_cloudwatch_logs: Replace insecure sprintf (#2451)
Signed-off-by: Zero King <[email protected]>
1 parent 6e50e0a commit dd18cea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/out_cloudwatch_logs/cloudwatch_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static int write_event(struct flb_cloudwatch *ctx, struct cw_flush *buf,
248248
{
249249
char ts[50];
250250

251-
if (!sprintf(ts, "%llu", event->timestamp)) {
251+
if (!snprintf(ts, 50, "%llu", event->timestamp)) {
252252
goto error;
253253
}
254254

0 commit comments

Comments
 (0)