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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to