diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2009-10-24 17:18:23 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2009-12-06 11:18:27 +0100 |
commit | 8546e3ce6e37c359979b69862442f94e0ef0e03b (patch) | |
tree | 6c4a3cbac72565a3de08c623cc29b787880c2e2a /drivers | |
parent | 87fbaf6aea142b01756bbea09461daee41d93c0b (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/atafb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 37624f74e88..b7687c55fe1 100644 --- 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); |