Commit 3ee6229f authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Mauro Carvalho Chehab

media: siano: fix a potential integer overflow

Add suffix ULL to constant 65535 in order to avoid a potential
integer overflow. This constant is used in a context that
expects an expression of type u64.

Addresses-Coverity-ID: 1056806
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 57422405
...@@ -271,7 +271,7 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client, ...@@ -271,7 +271,7 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
c->post_bit_count.stat[0].uvalue += p->ber_bit_count; c->post_bit_count.stat[0].uvalue += p->ber_bit_count;
/* Legacy PER/BER */ /* Legacy PER/BER */
tmp = p->ets_packets * 65535; tmp = p->ets_packets * 65535ULL;
if (p->ts_packets + p->ets_packets) if (p->ts_packets + p->ets_packets)
do_div(tmp, p->ts_packets + p->ets_packets); do_div(tmp, p->ts_packets + p->ets_packets);
client->legacy_per = tmp; client->legacy_per = tmp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment