Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 15:32:48 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300305 - head/sys/amd64/amd64
Message-ID:  <201605201532.u4KFWmMB049086@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri May 20 15:32:48 2016
New Revision: 300305
URL: https://svnweb.freebsd.org/changeset/base/300305

Log:
  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

Modified:
  head/sys/amd64/amd64/sys_machdep.c

Modified: head/sys/amd64/amd64/sys_machdep.c
==============================================================================
--- head/sys/amd64/amd64/sys_machdep.c	Fri May 20 15:14:38 2016	(r300304)
+++ head/sys/amd64/amd64/sys_machdep.c	Fri May 20 15:32:48 2016	(r300305)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605201532.u4KFWmMB049086>