diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-01-09 22:11:24 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-01-09 22:11:24 +0000 |
commit | 7a369d666028bb0e692544d1229bbdc6fa202c4a (patch) | |
tree | 5bcdd11b2db73b392d2ff05f714e0629354ef8b2 /pjsip | |
parent | 1208d06ccd3171c70eb2dbc9b90b71cee9bd8f27 (diff) |
Ticket #443: Overflow in dump_media_session() (thanks Simon Farmer)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1674 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 3d6e0961..5306d253 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -1898,8 +1898,8 @@ static void dump_media_session(const char *indent, good_number(packets, stat.rx.pkt), good_number(bytes, stat.rx.bytes), good_number(ipbytes, stat.rx.bytes + stat.rx.pkt * 40), - good_number(avg_bps, stat.rx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)), - good_number(avg_ipbps, (stat.rx.bytes + stat.rx.pkt * 40) * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)), + good_number(avg_bps, (pj_int32_t)((pj_int64_t)stat.rx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration))), + good_number(avg_ipbps, (pj_int32_t)(((pj_int64_t)stat.rx.bytes + stat.rx.pkt * 40) * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration))), indent, stat.rx.loss, stat.rx.loss * 100.0 / (stat.rx.pkt + stat.rx.loss), @@ -1958,8 +1958,8 @@ static void dump_media_session(const char *indent, good_number(packets, stat.tx.pkt), good_number(bytes, stat.tx.bytes), good_number(ipbytes, stat.tx.bytes + stat.tx.pkt * 40), - good_number(avg_bps, stat.tx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)), - good_number(avg_ipbps, (stat.tx.bytes + stat.tx.pkt * 40) * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)), + good_number(avg_bps, (pj_int32_t)((pj_int64_t)stat.tx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration))), + good_number(avg_ipbps, (pj_int32_t)(((pj_int64_t)stat.tx.bytes + stat.tx.pkt * 40) * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration))), indent, stat.tx.loss, |