mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 03:06:10 +00:00
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:
parent
87fbaf6aea
commit
8546e3ce6e
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue