Skip to content

Commit

Permalink
[sipcapture] fix possible data type loss
Browse files Browse the repository at this point in the history
(cherry picked from commit 1c811ce)
  • Loading branch information
ionutrazvanionita committed May 18, 2016
1 parent aeed4cb commit f8a3a1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/sipcapture/sipcapture.c
Expand Up @@ -4745,13 +4745,14 @@ static inline void build_hepv2_obj(struct hepv12* h2, struct _sipcapture_object*
sco->proto_type = 1;

if (h2->hdr.hp_v == 2) {
sco->tmstamp = h2->hep_time.tv_sec*1000000 + h2->hep_time.tv_usec;
sco->tmstamp = (unsigned long long)h2->hep_time.tv_sec*1000000
+ h2->hep_time.tv_usec;

/* WARN node must be allocated */
sco->node.len = snprintf(sco->node.s, 100, "%.*s:%i", capture_node.len, capture_node.s, h2->hep_time.captid);
} else {
gettimeofday(&tvb, NULL);
sco->tmstamp = tvb.tv_sec * 1000000 + tvb.tv_usec;
sco->tmstamp = (unsigned long long)tvb.tv_sec * 1000000 + tvb.tv_usec;

sco->node = capture_node;
}
Expand Down

0 comments on commit f8a3a1d

Please sign in to comment.