linux-4.2-rc7/drivers/s390/block/dcssblk.c: 3 * bad array index ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

1.

[linux-4.2-rc7/drivers/s390/block/dcssblk.c:553]: (style) Array index 'j' is used before limits check.

Source code is

        for (j = i; (buf[j] != ':') &&
            (buf[j] != '\0') &&
            (buf[j] != '\n') &&
            j < count; j++) {

Maybe

        for (j = i; (j < count) && 
            (buf[j] != ':') &&
            (buf[j] != '\0') &&
            (buf[j] != '\n'); j++) {

2.

[linux-4.2-rc7/drivers/s390/block/dcssblk.c:726]: (style) Array index 'i' is used before limits check.

    for (i = 0; ((*(buf+i)!='\0') && (*(buf+i)!='\n') && i < count); i++) {

3.

[linux-4.2-rc7/drivers/s390/block/dcssblk.c:909]: (style) Array index 'j' is used before limits check.

        for (j = i; (dcssblk_segments[j] != ',')  &&
                (dcssblk_segments[j] != '\0') &&
                (dcssblk_segments[j] != '(')  &&
                (j < DCSSBLK_PARM_LEN); j++)

Regards

David Binderman

 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux