diff options
author | mav <mav@FreeBSD.org> | 2016-05-17 19:00:09 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-05-17 19:00:09 +0000 |
commit | 0218beaccb2e7737d3e8ca5200b7673d712f83a1 (patch) | |
tree | 7659f53a2cb51fe197e16e8885fad237bc759809 /sys/dev/fb | |
parent | 002c0ad48790f0dcb7cfd97db5d3b598e077f5ad (diff) | |
download | FreeBSD-src-0218beaccb2e7737d3e8ca5200b7673d712f83a1.zip FreeBSD-src-0218beaccb2e7737d3e8ca5200b7673d712f83a1.tar.gz |
Fix NULL-dereference panic if VESA reports zero modes.
MFC after: 1 week
Diffstat (limited to 'sys/dev/fb')
-rw-r--r-- | sys/dev/fb/vesa.c | 3 |
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); |