Date: Sat, 30 Jan 2016 18:33:24 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295080 - head/sys/dev/iicbus Message-ID: <201601301833.u0UIXOTq026377@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@hardenedbsd.org> Submitted by: Madhi Moktari <mokhi64@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601301833.u0UIXOTq026377>