OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87fbaf6
)
fbdev: atafb - add palette register check
author
Krzysztof Helt
<krzysztof.h1@wp.pl>
Sat, 24 Oct 2009 15:18:23 +0000
(17:18 +0200)
committer
Geert Uytterhoeven
<geert@linux-m68k.org>
Sun, 6 Dec 2009 10:18:27 +0000
(11:18 +0100)
Add check if palette register number is in correct range
for few drivers which miss it. The regno value comes
indirectly from user space.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
drivers/video/atafb.c
patch
|
blob
|
history
diff --git
a/drivers/video/atafb.c
b/drivers/video/atafb.c
index
37624f7
..
b7687c5
100644
(file)
--- a/
drivers/video/atafb.c
+++ b/
drivers/video/atafb.c
@@
-2242,6
+2242,9
@@
static int ext_setcolreg(unsigned int regno, unsigned int red,
if (!external_vgaiobase)
return 1;
+ if (regno > 255)
+ return 1;
+
switch (external_card_type) {
case IS_VGA:
OUTB(0x3c8, regno);