]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r301139
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Jun 2016 01:17:22 +0000 (01:17 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Jun 2016 01:17:22 +0000 (01:17 +0000)
commit183500e00eaaf59ccd08b81bb592f1fbf221dc0d
tree19b93e8a2e2d9fc3d3e1cc36f89352a635a71693
parenteaf9b61b8e3b2818164a7b15dcb7f82f491cabcd
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@301571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
bin/sh/parser.c