Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ce00cae authored by Roel Kluin's avatar Roel Kluin Committed by James Bottomley
Browse files

[SCSI] gdth: fix buffer overflow



This allows i == MAXHA, which is out of range

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent e05a9e7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3842,7 +3842,7 @@ int __init option_setup(char *str)

    TRACE2(("option_setup() str %s\n", str ? str:"NULL")); 

    while (cur && isdigit(*cur) && i <= MAXHA) {
    while (cur && isdigit(*cur) && i < MAXHA) {
        ints[i++] = simple_strtoul(cur, NULL, 0);
        if ((cur = strchr(cur, ',')) != NULL) cur++;
    }