mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +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
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user