svn commit: r295080 - head/sys/dev/iicbus
Garrett Cooper
ngie at FreeBSD.org
Sat Jan 30 18:33:25 UTC 2016
Author: ngie
Date: Sat Jan 30 18:33:23 2016
New Revision: 295080
URL: https://svnweb.freebsd.org/changeset/base/295080
Log:
Use the correct type for i when iterating over `buf` to avoid unlikely
negative array indexing in iicrdwr(..)
Differential Revision: https://reviews.freebsd.org/D5132
Obtained from: HardenedBSD
PR: 206754
Reported by: CTurt <cturt at hardenedbsd.org>
Submitted by: Madhi Moktari <mokhi64 at gmail.com>
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/dev/iicbus/iic.c
Modified: head/sys/dev/iicbus/iic.c
==============================================================================
--- head/sys/dev/iicbus/iic.c Sat Jan 30 17:54:18 2016 (r295079)
+++ head/sys/dev/iicbus/iic.c Sat Jan 30 18:33:23 2016 (r295080)
@@ -293,7 +293,8 @@ iicrdwr(struct iic_cdevpriv *priv, struc
struct iic_msg *buf, *m;
void **usrbufs;
device_t iicdev, parent;
- int error, i;
+ int error;
+ uint32_t i;
iicdev = priv->sc->sc_dev;
parent = device_get_parent(iicdev);
More information about the svn-src-all
mailing list