Don't allow mmapping the page after last video page.

Obtained from:	syscons.c (bug obtained from original pccons.c)
This commit is contained in:
Bruce Evans 1995-10-14 05:54:47 +00:00
parent cb759a257f
commit 278b94817a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11465

View File

@ -741,7 +741,7 @@ do_standard:
int int
pcmmap(Dev_t dev, int offset, int nprot) pcmmap(Dev_t dev, int offset, int nprot)
{ {
if (offset > 0x20000) if (offset > 0x20000 - PAGE_SIZE)
return -1; return -1;
return i386_btop((0xa0000 + offset)); return i386_btop((0xa0000 + offset));
} }