diff options
author | maxim <maxim@FreeBSD.org> | 2002-12-24 11:58:05 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2002-12-24 11:58:05 +0000 |
commit | a59d939300a476e89fd904d21bef510b0d7f7da0 (patch) | |
tree | 2e5e521cdc6dfee4d3bd95aecb73922c52cdacba /usr.sbin/usbd/usbd.c | |
parent | 22ca3b530e0ece1ccb72f0d5bd2b07d9356e9eb0 (diff) | |
download | FreeBSD-src-a59d939300a476e89fd904d21bef510b0d7f7da0.zip FreeBSD-src-a59d939300a476e89fd904d21bef510b0d7f7da0.tar.gz |
Fix usbd.conf parsing: fgetln(3) returns a string without terminating
NUL character so do not expect it.
PR: bin/46489
MFC after: 1 week
Diffstat (limited to 'usr.sbin/usbd/usbd.c')
-rw-r--r-- | usr.sbin/usbd/usbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c index 85230af..3749048 100644 --- a/usr.sbin/usbd/usbd.c +++ b/usr.sbin/usbd/usbd.c @@ -448,7 +448,7 @@ read_configuration(void) } /* skip initial spaces */ - while (*line != '\0' && isspace(*line)) { + while (len > 0 && isspace(*line)) { line++; len--; } |