diff options
| author | Emmanuel Grumbach <[email protected]> | 2017-01-07 17:57:46 +0000 |
|---|---|---|
| committer | Luca Coelho <[email protected]> | 2017-02-08 15:54:20 +0000 |
| commit | 1aa0ec5cdf60b23dfc152f0e9e205f58b0a546b2 (patch) | |
| tree | 800e63cc1524c42c4fb53030afa4774f64451520 /drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |
| parent | iwlwifi: make RTPM depend on EXPERT (diff) | |
| download | kernel-1aa0ec5cdf60b23dfc152f0e9e205f58b0a546b2.tar.gz kernel-1aa0ec5cdf60b23dfc152f0e9e205f58b0a546b2.zip | |
iwlwifi: dvm: don't call << operator with a negative value
In https://bugzilla.kernel.org/show_bug.cgi?id=177341 Bob
reported a UBSAN WARNING on rs.c.
Undefined behaviour in drivers/net/wireless/intel/iwlwifi/dvm/rs.c:746:18
This because
i = index - 1;
for (mask = (1 << i); i >= 0; i--, mask >>= 1)
is unsafe: i could be negative and hence we can call <<
on a negative value.
This bug doesn't have any real impact since the condition
of the for loop will prevent any usage of mask.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177341
Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rs.c')
0 files changed, 0 insertions, 0 deletions
