HomeFreeBSD

MFC r301139

Description

MFC r301139

The (i < PROMPTLEN - 1) test added by r300442 in the code for the default
case of \c in the prompt format string is a no-op. We already passed
this test at the top of the loop, and i has not yet been incremented in
this path. Change this test to (i < PROMPTLEN - 2).

Reported by: Coverity
CID: 1008328
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D6552

Details

Provenance
truckmanAuthored on
Reviewer
cem
Differential Revision
D6552: Another try at fixing Coverity 1008328 in /bin/sh
Parents
rS301570: libsupc++: Fix typo in symbol map.
Branches
Unknown
Tags
Unknown