out-of-bounds array index

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <jesse.barnes@...>
Date: Thursday, February 7, 2008 - 2:56 pm

Hi,

Just saw this from gcc:

drivers/char/drm/i915_drv.c: In function ?i915_suspend?:
drivers/char/drm/i915_drv.c:173: warning: array subscript is above array
bounds
  CC [M]  drivers/char/drm/i915_dma.o
drivers/char/drm/i915_drv.c: In function ?i915_resume?:
drivers/char/drm/i915_drv.c:220: warning: array subscript is above array
bounds

It's this code:

        dev_priv->saveGR[0x18] =
                i915_read_indexed(VGA_GR_INDEX, VGA_GR_DATA, 0x18);

which looks legit, since saveGR is

        u8 saveGR[24];

It has been introduced by commit
ba8bbcf6ff4650712f64c0ef61139c73898e2165, which seems to be you Jesse.

-- 
Jens Axboe

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
out-of-bounds array index, Jens Axboe, (Thu Feb 7, 2:56 pm)
Re: out-of-bounds array index, Jan Engelhardt, (Thu Feb 7, 3:21 pm)
Re: out-of-bounds array index, Jesse Barnes, (Thu Feb 7, 3:28 pm)
Re: out-of-bounds array index, Jens Axboe, (Thu Feb 7, 4:01 pm)
Re: out-of-bounds array index, Jesse Barnes, (Thu Feb 7, 3:15 pm)
Re: out-of-bounds array index, Jesse Barnes, (Thu Feb 7, 3:03 pm)