diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2017-09-20 03:09:18 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-14 15:50:12 +0100 |
commit | 3ee6229f1a16ad80ac83f02614f46b70b7ecf666 (patch) | |
tree | c16d9ce6e7ccb3c52989ea189a2e41492325777c | |
parent | media: dvbsky: MyGica T230C support (diff) | |
download | linux-3ee6229f1a16ad80ac83f02614f46b70b7ecf666.tar.xz linux-3ee6229f1a16ad80ac83f02614f46b70b7ecf666.zip |
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: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/common/siano/smsdvb-main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c index affde1426b7a..166428cbd3c8 100644 --- a/drivers/media/common/siano/smsdvb-main.c +++ b/drivers/media/common/siano/smsdvb-main.c @@ -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; /* Legacy PER/BER */ - tmp = p->ets_packets * 65535; + tmp = p->ets_packets * 65535ULL; if (p->ts_packets + p->ets_packets) do_div(tmp, p->ts_packets + p->ets_packets); client->legacy_per = tmp; |