Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=23c15c21d34a4b4b4d7b9a95ce498991c5339c77
Commit:     23c15c21d34a4b4b4d7b9a95ce498991c5339c77
Parent:     65adfa911a3522c1e40e55afd472dd571dc2431b
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Sat May 19 08:51:57 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Sat May 19 08:51:57 2007 -0700

    mlx4_core: Fix array overrun in dump_dev_cap_flags()
    
    Don't overrun fname[] array when decoding device flags.
    
    This was spotted by the Coverity checker (CID 1642).
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/net/mlx4/fw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index c427173..cfa5cc0 100644
--- 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]);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to