Skip to content
Commit 57c6cb81 authored by Colin Ian King's avatar Colin Ian King Committed by Johannes Berg
Browse files

mac80211: ethtool: avoid 32 bit multiplication overflow



The multiplication of 100000 * cfg80211_calculate_bitrate() is a 32 bit
operation and can overflow if cfg80211_calculate_bitrate is greater
than 42949. Although I don't believe this is occurring at present, it
would be safer to avoid the potential overflow by making the constant
100000 an ULL to ensure a 64 multiplication occurs.

Detected by CoverityScan, CID#1468643 ("Unintentional integer overflow")

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 2fe4a29a
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