DORMANTno replies

[PATCH 6/18] arcfb: Fix dereference before NULL check

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2006-03-11 01:58:36
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

info->par is dereferenced before info is checked for NULL. Fix.

Coverity Bug 833

Signed-off-by: Antonino Daplas <redacted>
---

 drivers/video/arcfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 0cf26da..4660428 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -459,11 +459,11 @@ static ssize_t arcfb_write(struct file *
 	inode = file->f_dentry->d_inode;
 	fbidx = iminor(inode);
 	info = registered_fb[fbidx];
-	par = info->par;
 
 	if (!info || !info->screen_base)
 		return -ENODEV;
 
+	par = info->par;
 	xres = info->var.xres;
 	fbmemlength = (xres * info->var.yres)/8;
 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help