summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-05-20 15:32:48 +0000
committerkib <kib@FreeBSD.org>2016-05-20 15:32:48 +0000
commitb357843884ed25703771c254ed20927d082d59e2 (patch)
treeeaac28bd67e9eaf16c7ca183b320884e408604f0 /sys/amd64
parent57667e052457989f9ca3ed08b3faa6ecf33c2916 (diff)
downloadFreeBSD-src-b357843884ed25703771c254ed20927d082d59e2.zip
FreeBSD-src-b357843884ed25703771c254ed20927d082d59e2.tar.gz
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
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/sys_machdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 7f6c50e..7a1df6b 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -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);
OpenPOWER on IntegriCloud