Module Name: src
Committed By: christos
Date: Mon Feb 1 17:40:49 UTC 2016
Modified Files:
src/sys/dev/pci/n8/common/api: n8_pk_ops.c
Log Message:
PR/50738: David Binderman: Check bounds before dereferencing.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/n8/common/api/n8_pk_ops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/n8/common/api/n8_pk_ops.c
diff -u src/sys/dev/pci/n8/common/api/n8_pk_ops.c:1.1 src/sys/dev/pci/n8/common/api/n8_pk_ops.c:1.2
--- src/sys/dev/pci/n8/common/api/n8_pk_ops.c:1.1 Thu Oct 30 08:02:14 2008
+++ src/sys/dev/pci/n8/common/api/n8_pk_ops.c Mon Feb 1 12:40:49 2016
@@ -32,7 +32,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-static char const n8_id[] = "$Id: n8_pk_ops.c,v 1.1 2008/10/30 12:02:14 darran Exp $";
+static char const n8_id[] = "$Id: n8_pk_ops.c,v 1.2 2016/02/01 17:40:49 christos Exp $";
/*****************************************************************************/
/** @file n8_pk_ops.c
* @brief Implementation of PKP Base Operations
@@ -100,7 +100,7 @@ static void stripLeadingZeros(const N8_S
out_p->value_p = in_p->value_p;
i = 0;
- while ((in_p->value_p[i] == 0x0) && (i < in_p->lengthBytes))
+ while (i < in_p->lengthBytes && in_p->value_p[i] == 0x0)
{
i++;
}