Skip to content

Commit

Permalink
MT#55283 fix possible integer overflow
Browse files Browse the repository at this point in the history
Change-Id: I0ec9ccafe1a0479a720d33ba48847c8c7bbf0e6b
Warned-by: Coverity
  • Loading branch information
rfuchs committed Oct 23, 2024
1 parent 1aca54a commit 3ac0857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/ssrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void mos_calc_legacy(struct ssrc_stats_block *ssb) {
rtt = 0; // ignore RTT

// as per https://www.pingman.com/kb/article/how-is-mos-calculated-in-pingplotter-pro-50.html
int eff_rtt = ssb->rtt / 1000 + ssb->jitter * 2 + 10;
uint64_t eff_rtt = ssb->rtt / 1000 + ssb->jitter * 2 + 10;
int64_t r; // e6
if (eff_rtt < 160)
r = 93200000 - eff_rtt * 100000 / 4;
Expand Down

0 comments on commit 3ac0857

Please sign in to comment.