diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-12 03:08:13 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-12 03:08:13 +0000 |
commit | 4f08a7e5a3f4885cac0fc7e770a2af12a2f8225c (patch) | |
tree | b07a18cdc28da5fb300e4e2fa902722723cd3210 /usr.sbin | |
parent | aad270b0d364be6877db5d40ae77209813cd3040 (diff) |
rev 1.305
Use the correct length when copying trailing data!!
From brian FreeBSD
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ppp/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c index e5cee805b7c..d98b350927a 100644 --- a/usr.sbin/ppp/ppp/command.c +++ b/usr.sbin/ppp/ppp/command.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: command.c,v 1.83 2005/07/12 03:01:12 brad Exp $ + * $OpenBSD: command.c,v 1.84 2005/07/12 03:08:12 brad Exp $ */ #include <sys/param.h> @@ -451,7 +451,7 @@ subst(char *tgt, const char *oldstr, const char *newstr) tgt = ntgt; } if (lnewstr > loldstr) - bcopy(word + loldstr, word + lnewstr, ltgt - pos - loldstr); + bcopy(word + loldstr, word + lnewstr, ltgt - pos - lnewstr); bcopy(newstr, word, lnewstr); } while ((word = strstrword(word, oldstr))); |