projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16afe81
)
[PATCH] arcfb: Fix dereference before NULL check
author
Antonino A. Daplas
<adaplas@gmail.com>
Sat, 11 Mar 2006 11:27:23 +0000
(
03:27
-0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sat, 11 Mar 2006 17:19:35 +0000
(09:19 -0800)
info->par is dereferenced before info is checked for NULL. Fix.
Coverity Bug 833
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/arcfb.c
patch
|
blob
|
history
diff --git
a/drivers/video/arcfb.c
b/drivers/video/arcfb.c
index
0cf26da
..
4660428
100644
(file)
--- a/
drivers/video/arcfb.c
+++ b/
drivers/video/arcfb.c
@@
-459,11
+459,11
@@
static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou
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;