All of lore.kernel.org
 help / color / mirror / Atom feed
From: chris.nicholson@cnick.org.uk
To: airlied@linux.ie, bskeggs@redhat.com, madman2003@gmail.com,
	koriakin@0x04.net, currojerez@riseup.net, tacconet@libero.it
Cc: dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH] Gpu: drm: fix buffer overflow in nouveau_bios.c
Date: Sat, 20 Feb 2010 18:49:43 +0000	[thread overview]
Message-ID: <1266691783-25029-1-git-send-email-chris.nicholson@cnick.org.uk> (raw)

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


             reply	other threads:[~2010-02-20 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-20 18:49 chris.nicholson [this message]
2010-02-20 19:58 ` [PATCH] Gpu: drm: fix buffer overflow in nouveau_bios.c Francisco Jerez
2010-02-20 19:58   ` Francisco Jerez

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=1266691783-25029-1-git-send-email-chris.nicholson@cnick.org.uk \
    --to=chris.nicholson@cnick.org.uk \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=currojerez@riseup.net \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=koriakin@0x04.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madman2003@gmail.com \
    --cc=tacconet@libero.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.