提交 8546e3ce 编写于 作者: K Krzysztof Helt 提交者: Geert Uytterhoeven

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: NKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 87fbaf6a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册