public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Tomasz Kvarsin" <kvarsin@gmail.com>
Cc: dcb314@hotmail.com, linux-kernel@vger.kernel.org,
	Evgeniy Dushistov <dushistov@mail.ru>
Subject: Re: fs/ufs/inode.c:817: warning: array subscript is above array bounds
Date: Wed, 31 Jan 2007 13:24:32 -0800	[thread overview]
Message-ID: <20070131132432.e2dc4058.akpm@osdl.org> (raw)
In-Reply-To: <5157576d0701311210j737a3f40h63cef509dadc170f@mail.gmail.com>

On Wed, 31 Jan 2007 23:10:57 +0300
"Tomasz Kvarsin" <kvarsin@gmail.com> wrote:

> d binderman wrote:
> >Hello there,
> >
> >I just tried to compile Linux kernel 2.6.19.2 with the
> >new GNU C compiler version 4.3 snapshot 20070126.
> >
> >The compiler said
> >
> >fs/ufs/inode.c:817: warning: array subscript is above array bounds
> >
> >The source code is
> >
> >        for (i = 0; i < (UFS_NDADDR + UFS_NINDIR); i++)
> >            ufs_inode->ui_u2.ui_addr.ui_db[i] = ufsi->i_u1.i_data[i];
> >
> >but
> >
> >./include/linux/ufs_fs.h:                       __fs32  ui_db[UFS_NDADDR];/*
> >0x28 data blocks */
> >./include/linux/ufs_fs.h:                       __fs64
> >ui_db[UFS_NDADDR]; /* 112: Direct disk blocks. */
> >
> >and
> >
> >        __fs32  i_data[15];
> >
> >and
> >
> >#define UFS_NDADDR 12
> >#define UFS_NINDIR 3
> >
> >so the kernel seems to be trying to write fifteen bytes into an array only
> >twelve
> >bytes in size. Suggest code rework.
> 
> 
> As I see, linux-kernel is very high volume(noise?) list,
> may better wil be resend to relevant mantainer(Andrew Morton?)

Evgeniy, please consider raising a patch against ./MAINTAINERS ;)

  reply	other threads:[~2007-01-31 21:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31 20:10 fs/ufs/inode.c:817: warning: array subscript is above array bounds Tomasz Kvarsin
2007-01-31 21:24 ` Andrew Morton [this message]
2007-02-01 20:55   ` Evgeniy Dushistov
2007-01-31 21:27 ` Randy Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2007-01-31  9:08 d binderman

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=20070131132432.e2dc4058.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=dcb314@hotmail.com \
    --cc=dushistov@mail.ru \
    --cc=kvarsin@gmail.com \
    --cc=linux-kernel@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