public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Fix NULL-ptr dereference in pm2fb_probe
@ 2004-04-23  2:13 Patrick McHardy
  2004-04-23  8:14 ` Jim Hague
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick McHardy @ 2004-04-23  2:13 UTC (permalink / raw)
  To: jim.hague; +Cc: jsimmons, linux-kernel

[-- 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) {

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

end of thread, other threads:[~2004-04-24 12:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-23  2:13 [PATCH]: Fix NULL-ptr dereference in pm2fb_probe Patrick McHardy
2004-04-23  8:14 ` Jim Hague
2004-04-23 14:34   ` Patrick McHardy
2004-04-23 23:07     ` James Simmons
2004-04-24 12:19       ` Jim Hague

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