]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Avoid reading one byte before the path buffer.
authorbrooks <brooks@FreeBSD.org>
Wed, 22 Jul 2020 21:44:51 +0000 (21:44 +0000)
committerbrooks <brooks@FreeBSD.org>
Wed, 22 Jul 2020 21:44:51 +0000 (21:44 +0000)
commita90c65d63568aec317ddf5575e4009b4171fc729
tree6736bdd65eca6d458b44d2781522dfa4ca938ba6
parent0f96b37978b68817d3ad49f631dbb256311e6421
Avoid reading one byte before the path buffer.

This happens when there's only one component (e.g. "/foo"). This
(mostly-harmless) bug has been present since June 1990 when it was
commited to mountd.c SCCS version 5.9.

Note: the bug is on the second changed line, the first line is changed
for visual consistency.

Reviewed by: cem, emaste, mckusick, rmacklem
Found with: CHERI
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25759
usr.sbin/mountd/mountd.c