MT#55283 fix possible integer overflow

Change-Id: I0ec9ccafe1a0479a720d33ba48847c8c7bbf0e6b
Warned-by: Coverity
pull/1876/head
Richard Fuchs 1 year ago
parent 1aca54ab01
commit 3ac08574bd

@ -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;

Loading…
Cancel
Save