From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-s390@vger.kernel.org
Subject: Re: linux-4.2-rc7/drivers/s390/block/dcssblk.c: 3 * bad array index ?
Date: Wed, 19 Aug 2015 07:43:46 +0000 [thread overview]
Message-ID: <20150819094346.1150dba4@mschwide> (raw)
In-Reply-To: <DUB128-W11065573F4730A28DBF59A9C670@phx.gbl>
[-- 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.
parent reply other threads:[~2015-08-19 7:43 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <DUB128-W11065573F4730A28DBF59A9C670@phx.gbl>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150819094346.1150dba4@mschwide \
--to=schwidefsky@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).