summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2016-05-17 19:00:09 +0000
committermav <mav@FreeBSD.org>2016-05-17 19:00:09 +0000
commit0218beaccb2e7737d3e8ca5200b7673d712f83a1 (patch)
tree7659f53a2cb51fe197e16e8885fad237bc759809
parent002c0ad48790f0dcb7cfd97db5d3b598e077f5ad (diff)
downloadFreeBSD-src-0218beaccb2e7737d3e8ca5200b7673d712f83a1.zip
FreeBSD-src-0218beaccb2e7737d3e8ca5200b7673d712f83a1.tar.gz
Fix NULL-dereference panic if VESA reports zero modes.
MFC after: 1 week
-rw-r--r--sys/dev/fb/vesa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c
index 4ab83c3..bd6b759 100644
--- a/sys/dev/fb/vesa.c
+++ b/sys/dev/fb/vesa.c
@@ -1025,7 +1025,8 @@ vesa_bios_init(void)
++modes;
}
- vesa_vmode[modes].vi_mode = EOT;
+ if (vesa_vmode != NULL)
+ vesa_vmode[modes].vi_mode = EOT;
if (bootverbose)
printf("VESA: %d mode(s) found\n", modes);
OpenPOWER on IntegriCloud