Skip to content

Commit

Permalink
out_cloudwatch: Fix integer overflow on 32 bit systems when convertin…
Browse files Browse the repository at this point in the history
…g tv_sec to millis (#3640)

Signed-off-by: Neil Bertram <[email protected]>
  • Loading branch information
nbertram authored and nokute78 committed Aug 5, 2021
1 parent 9c1252c commit 4dba97a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/out_cloudwatch_logs/cloudwatch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ int process_event(struct flb_cloudwatch *ctx, struct cw_flush *buf,
event = &buf->events[buf->event_index];
event->json = tmp_buf_ptr;
event->len = written;
event->timestamp = (unsigned long long) (tms->tm.tv_sec * 1000 +
event->timestamp = (unsigned long long) (tms->tm.tv_sec * 1000ull +
tms->tm.tv_nsec/1000000);

}
Expand Down

0 comments on commit 4dba97a

Please sign in to comment.