Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/bdes PR/50739: David Binderman: Check bounds before ...
details: https://anonhg.NetBSD.org/src/rev/5452b8ebf9bc
branches: trunk
changeset: 343397:5452b8ebf9bc
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 01 17:41:37 2016 +0000
description:
PR/50739: David Binderman: Check bounds before dereferencing.
diffstat:
usr.bin/bdes/bdes.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b120b758f9ec -r 5452b8ebf9bc usr.bin/bdes/bdes.c
--- a/usr.bin/bdes/bdes.c Mon Feb 01 17:40:49 2016 +0000
+++ b/usr.bin/bdes/bdes.c Mon Feb 01 17:41:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bdes.c,v 1.9 2013/08/15 20:48:56 joerg Exp $ */
+/* $NetBSD: bdes.c,v 1.10 2016/02/01 17:41:37 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)bdes.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: bdes.c,v 1.9 2013/08/15 20:48:56 joerg Exp $");
+__RCSID("$NetBSD: bdes.c,v 1.10 2016/02/01 17:41:37 christos Exp $");
#endif
#endif /* not lint */
@@ -425,7 +425,7 @@
/*
* now translate it, bombing on any illegal hex digit
*/
- for (i = 0; ibuf[i] && i < 16; i++)
+ for (i = 0; i < 16 && ibuf[i]; i++)
if ((nbuf[i] = tobinhex(ibuf[i], 16)) == -1)
bdes_err(-1, "bad hex digit in key");
while (i < 16)
Home |
Main Index |
Thread Index |
Old Index