summaryrefslogtreecommitdiff
path: root/sbin/scsi
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-12 16:08:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-12 16:08:18 +0000
commit412ff0d1efbee0b590f20008cad7b92741b0c0c3 (patch)
tree47180c7207dbba75f905262e9b6b74f27fff16b6 /sbin/scsi
parent329df782e088780ead944b8d12e00b231c5e42bd (diff)
reading off the end of table bug, found by parfait
Diffstat (limited to 'sbin/scsi')
-rw-r--r--sbin/scsi/libscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/scsi/libscsi.c b/sbin/scsi/libscsi.c
index b9cde8648d6..9d362cd020c 100644
--- a/sbin/scsi/libscsi.c
+++ b/sbin/scsi/libscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: libscsi.c,v 1.6 2008/01/13 20:23:34 chl Exp $ */
+/* $OpenBSD: libscsi.c,v 1.7 2009/11/12 16:08:17 deraadt Exp $ */
/* Copyright (c) 1994 HD Associates
* (contact: dufault@hda.com)
@@ -197,7 +197,7 @@ do_buff_decode(u_char *databuf, size_t len,
int i = 0;
fmt++; /* Skip '{' */
while (*fmt && (*fmt != '}')) {
- if (i < sizeof(field_name))
+ if (i < sizeof(field_name)-1)
field_name[i++] = *fmt;
fmt++;