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 (fluent#3640)
  • Loading branch information
nbertram committed Jun 16, 2021
1 parent 3a20a85 commit 2dcf2ab
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 @@ -435,7 +435,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 2dcf2ab

Please sign in to comment.