From 18b8dc18fd628079a13be46093089edc06595679 Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Tue, 11 Jul 2000 00:06:44 +0000 Subject: [PATCH] Fix an off-by-one error which breaks this (detected by malloc flags): the line being read in was terminated one byte too late. --- usr.sbin/usbd/usbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c index 06e7637bf853..4252e0f01054 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