Skip to content
Snippets Groups Projects
Commit 8546e3ce authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Geert Uytterhoeven
Browse files

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: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 87fbaf6a
Branches
Tags
No related merge requests found
...@@ -2242,6 +2242,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red, ...@@ -2242,6 +2242,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,
if (!external_vgaiobase) if (!external_vgaiobase)
return 1; return 1;
if (regno > 255)
return 1;
switch (external_card_type) { switch (external_card_type) {
case IS_VGA: case IS_VGA:
OUTB(0x3c8, regno); OUTB(0x3c8, regno);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment