提交 d1d608ce 编写于 作者: H Haowen Bai 提交者: Helge Deller

video: fbdev: sis: fix potential NULL dereference in sisfb_post_sis300()

Do no access bios[] if it's NULL.
Signed-off-by: NHaowen Bai <baihaowen@meizu.com>
Signed-off-by: NHelge Deller <deller@gmx.de>
上级 b23e868d
......@@ -4463,7 +4463,7 @@ static void sisfb_post_sis300(struct pci_dev *pdev)
SiS_SetReg(SISCR, 0x37, 0x02);
SiS_SetReg(SISPART2, 0x00, 0x1c);
v4 = 0x00; v5 = 0x00; v6 = 0x10;
if(ivideo->SiS_Pr.UseROM) {
if (ivideo->SiS_Pr.UseROM && bios) {
v4 = bios[0xf5];
v5 = bios[0xf6];
v6 = bios[0xf7];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册