Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=699b052ad2996c4ca87aa4b9d4a51dcca0f9e588
Commit:     699b052ad2996c4ca87aa4b9d4a51dcca0f9e588
Parent:     afda5e4da5abf7366ba8ac49e7634b3c85a143ae
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 5 21:42:25 2007 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Nov 5 21:42:25 2007 +0100

    ide: do_identify() string termination fix
    
    Terminates id->model string before invoking strstr() in do_identify().
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-probe.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 6a6f2e0..56fb0b8 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -172,11 +172,12 @@ static inline void do_identify (ide_drive_t *drive, u8 
cmd)
        ide_fixstring(id->fw_rev,    sizeof(id->fw_rev),    bswap);
        ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap);
 
+       /* we depend on this a lot! */
+       id->model[sizeof(id->model)-1] = '\0';
+
        if (strstr(id->model, "E X A B Y T E N E S T"))
                goto err_misc;
 
-       /* we depend on this a lot! */
-       id->model[sizeof(id->model)-1] = '\0';
        printk("%s: %s, ", drive->name, id->model);
        drive->present = 1;
        drive->dead = 0;
-
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