All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: jim.hague@acm.org
Cc: jsimmons@infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH]: Fix NULL-ptr dereference in pm2fb_probe
Date: Fri, 23 Apr 2004 04:13:55 +0200	[thread overview]
Message-ID: <40887BE3.9080502@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

This patch fixes a NULL-pointer dereference in pm2fb_probe.
The memset sets info->par to 0, it is dereferenced shortly
afterwards. framebuffer_alloc already initializes the memory
to 0, so it can simply be removed.

Regards
Patrick



[-- Attachment #2: pm2fb_probe.diff --]
[-- Type: text/x-patch, Size: 639 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/04/23 04:05:58+02:00 kaber@trash.net 
#   Fix NULL-ptr dereference in pm2fb_probe
# 
# drivers/video/pm2fb.c
#   2004/04/23 03:59:41+02:00 kaber@trash.net +0 -2
#   Fix NULL-ptr dereference in pm2fb_probe
# 
diff -Nru a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
--- a/drivers/video/pm2fb.c	Fri Apr 23 04:06:53 2004
+++ b/drivers/video/pm2fb.c	Fri Apr 23 04:06:53 2004
@@ -1035,8 +1035,6 @@
 	info = framebuffer_alloc(size, &pdev->dev);
 	if ( !info )
 		return -ENOMEM;
-	memset(info, 0, size);
-    
 	default_par = info->par;
  
 	switch (pdev->device) {

             reply	other threads:[~2004-04-23  2:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23  2:13 Patrick McHardy [this message]
2004-04-23  8:14 ` [PATCH]: Fix NULL-ptr dereference in pm2fb_probe Jim Hague
2004-04-23 14:34   ` Patrick McHardy
2004-04-23 23:07     ` James Simmons
2004-04-24 12:19       ` Jim Hague

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=40887BE3.9080502@trash.net \
    --to=kaber@trash.net \
    --cc=jim.hague@acm.org \
    --cc=jsimmons@infradead.org \
    --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 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.