Skip to content

Commit

Permalink
Fix timestamp overflow in mjr2pcap
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Dec 13, 2023
1 parent 6f6ac5e commit 590690d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/postprocessing/mjr2pcap.c
Expand Up @@ -348,7 +348,7 @@ int main(int argc, char *argv[]) {
struct timeval tv;
if(has_timestamps) {
/* Prepare a valid timestamp */
gint64 timestamp = started + (pkt_ts*1000);
gint64 timestamp = started + ((gint64)pkt_ts*1000);
tv.tv_sec = timestamp / G_USEC_PER_SEC;
tv.tv_usec = timestamp - (tv.tv_sec*G_USEC_PER_SEC);
} else {
Expand Down

0 comments on commit 590690d

Please sign in to comment.