linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Samuelson <peter@p12n.org>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [patch] con2fbmap limit check
Date: Wed, 31 Oct 2007 15:50:20 -0500	[thread overview]
Message-ID: <20071031205020.GC27631@p12n.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0710312048270.12491@anakin>


[Geert Uytterhoeven]
> No patch included?

Ha.  Guess I was hasty.  Sorry about that.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

commit fe3c8a57a2f8c0b169898c5a0b5f3dcc6de5943e
Author: Peter Samuelson <peter@p12n.org>
Date:   Wed Oct 31 09:49:28 2007 -0500

    Fix limit check in FBIOPUT_CON2FBMAP ioctl.
    
    Signed-Off-By: Peter Samuelson <peter@p12n.org>

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 1194f5e..df679ef 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1057,7 +1057,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 	case FBIOPUT_CON2FBMAP:
 		if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
 			return - EFAULT;
-		if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES)
+		if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
 		    return -EINVAL;
 		if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
 		    return -EINVAL;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

      reply	other threads:[~2007-10-31 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31 14:58 [patch] con2fbmap limit check Peter Samuelson
2007-10-31 19:48 ` Geert Uytterhoeven
2007-10-31 20:50   ` Peter Samuelson [this message]

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=20071031205020.GC27631@p12n.org \
    --to=peter@p12n.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).