Use unsigned type for the loop index to make overflow checks effective.

PR:	209661
Reported by:	cturt
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2016-05-20 15:32:48 +00:00
parent 2c9dee79ef
commit ae76e30131

View File

@ -333,11 +333,12 @@ amd64_set_ioperm(td, uap)
struct thread *td;
struct i386_ioperm_args *uap;
{
int i, error;
char *iomap;
struct amd64tss *tssp;
struct system_segment_descriptor *tss_sd;
struct pcb *pcb;
u_int i;
int error;
if ((error = priv_check(td, PRIV_IO)) != 0)
return (error);