public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Gpu: drm: fix buffer overflow in nouveau_bios.c
@ 2010-02-20 18:49 chris.nicholson
  2010-02-20 19:58 ` Francisco Jerez
  0 siblings, 1 reply; 2+ messages in thread
From: chris.nicholson @ 2010-02-20 18:49 UTC (permalink / raw)
  To: airlied, bskeggs, madman2003, koriakin, currojerez, tacconet
  Cc: dri-devel, linux-kernel

From: Chris Nicholson <chris@port.cnick.org.uk>

This is a patch to the nouveau_bios.c file that fixes up a
buffer overflow

Signed-off-by: Chris Nicholson <chris.nicholson@cnick.org.uk>
---
 drivers/gpu/drm/nouveau/nouveau_bios.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 0e9cd1d..c1cee91 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -762,7 +762,7 @@ static uint32_t get_tmds_index_reg(struct drm_device *dev, uint8_t mlv)
 			dacoffset ^= 8;
 		return 0x6808b0 + dacoffset;
 	} else {
-		if (mlv > ARRAY_SIZE(pramdac_table)) {
+		if (mlv >= ARRAY_SIZE(pramdac_table)) {
 			NV_ERROR(dev, "Magic Lookup Value too big (%02X)\n",
 									mlv);
 			return 0;
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-20 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-20 18:49 [PATCH] Gpu: drm: fix buffer overflow in nouveau_bios.c chris.nicholson
2010-02-20 19:58 ` Francisco Jerez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox