linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-4.2-rc7/drivers/s390/block/dcssblk.c: 3 * bad array index ?
       [not found] <DUB128-W11065573F4730A28DBF59A9C670@phx.gbl>
@ 2015-08-19  7:43 ` Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2015-08-19  7:43 UTC (permalink / raw)
  To: linux-s390

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

On Wed, 19 Aug 2015 07:30:58 +0000
David Binderman <dcb314@hotmail.com> wrote:

> 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++)

Thanks for the heads-up. This is broken(ish). I'll fix it.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-19  7:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <DUB128-W11065573F4730A28DBF59A9C670@phx.gbl>
2015-08-19  7:43 ` linux-4.2-rc7/drivers/s390/block/dcssblk.c: 3 * bad array index ? Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).