projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65adfa9
)
mlx4_core: Fix array overrun in dump_dev_cap_flags()
author
Roland Dreier
<rolandd@cisco.com>
Sat, 19 May 2007 15:51:57 +0000
(08:51 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Sat, 19 May 2007 15:51:57 +0000
(08:51 -0700)
Don't overrun fname[] array when decoding device flags.
This was spotted by the Coverity checker (CID 1642).
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/net/mlx4/fw.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/mlx4/fw.c
b/drivers/net/mlx4/fw.c
index c427173136639565989104a9fdb997749a0b4d1e..cfa5cc0723397315c2c011e45697bec0d36b48fa 100644
(file)
--- a/
drivers/net/mlx4/fw.c
+++ b/
drivers/net/mlx4/fw.c
@@
-90,7
+90,7
@@
static void dump_dev_cap_flags(struct mlx4_dev *dev, u32 flags)
int i;
mlx4_dbg(dev, "DEV_CAP flags:\n");
- for (i = 0; i <
32
; ++i)
+ for (i = 0; i <
ARRAY_SIZE(fname)
; ++i)
if (fname[i] && (flags & (1 << i)))
mlx4_dbg(dev, " %s\n", fname[i]);
}