diff options
author | 2009-11-12 16:08:17 +0000 | |
---|---|---|
committer | 2009-11-12 16:08:17 +0000 | |
commit | 06b05e2158542505bc2e3cfe93708d75b3c34d3b (patch) | |
tree | 41959c7a245216bd44645f4b5e29859547faad3c | |
parent | for packets with unknown payloads (outside the range of our knowledge) simply (diff) | |
download | wireguard-openbsd-06b05e2158542505bc2e3cfe93708d75b3c34d3b.tar.xz wireguard-openbsd-06b05e2158542505bc2e3cfe93708d75b3c34d3b.zip |
reading off the end of table bug, found by parfait
-rw-r--r-- | sbin/scsi/libscsi.c | 4 |
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++; |