dect
/
linux-2.6
Archived
13
0
Fork 0

fbdev: atafb - add palette register check

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>
This commit is contained in:
Krzysztof Helt 2009-10-24 17:18:23 +02:00 committed by Geert Uytterhoeven
parent 87fbaf6aea
commit 8546e3ce6e
1 changed files with 3 additions and 0 deletions

View File

@ -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);