summaryrefslogtreecommitdiffstats
path: root/usr.sbin/usbd/usbd.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-07-11 00:06:44 +0000
committergreen <green@FreeBSD.org>2000-07-11 00:06:44 +0000
commit305d74b0be54e5c2f063714cb8181f879c8bfd16 (patch)
tree954e575d811c3034f3ec3abbc234af52506a8439 /usr.sbin/usbd/usbd.c
parent26c685c42a956eef20064a86e98e1785bfd10eb4 (diff)
downloadFreeBSD-src-305d74b0be54e5c2f063714cb8181f879c8bfd16.zip
FreeBSD-src-305d74b0be54e5c2f063714cb8181f879c8bfd16.tar.gz
Fix an off-by-one error which breaks this (detected by malloc flags):
the line being read in was terminated one byte too late.
Diffstat (limited to 'usr.sbin/usbd/usbd.c')
-rw-r--r--usr.sbin/usbd/usbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c
index 06e7637..4252e0f 100644
--- a/usr.sbin/usbd/usbd.c
+++ b/usr.sbin/usbd/usbd.c
@@ -461,7 +461,7 @@ read_configuration(void)
exit(2);
}
strncpy(linez, line, len);
- linez[len+1] = '\0';
+ linez[len] = '\0';
/* find the end of the current word (is field), that's the
* start of the arguments
OpenPOWER on IntegriCloud