Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=64e862a579015d229b8e40b6bc4ac3612e9656e1
Commit:     64e862a579015d229b8e40b6bc4ac3612e9656e1
Parent:     cc5f916e90a811dd8f809b4d17409f98e74b237c
Author:     Corey Minyard <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 14:37:13 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 30 08:06:55 2007 -0700

    IPMI: fix comparison in demangle_device_id
    
    Coverity spotted some incorrect code in a recent change to the IPMI driver;
    this patch make sure the data is really long enough to pull the
    manufacturer id and product id out of a get device id message.
    
    Signed-off-by: Corey Minyard <[EMAIL PROTECTED]>
    Cc: Adrian Bunk <[EMAIL PROTECTED]>
    Cc: Stian Jordet <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/ipmi_smi.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h
index 56ae438..6e8cec5 100644
--- a/include/linux/ipmi_smi.h
+++ b/include/linux/ipmi_smi.h
@@ -173,7 +173,7 @@ static inline int ipmi_demangle_device_id(const unsigned 
char *data,
        id->firmware_revision_2 = data[3];
        id->ipmi_version = data[4];
        id->additional_device_support = data[5];
-       if (data_len >= 6) {
+       if (data_len >= 11) {
                id->manufacturer_id = (data[6] | (data[7] << 8) |
                                       (data[8] << 16));
                id->product_id = data[9] | (data[10] << 8);
-
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