Use the correct length when copying trailing data!!
PR: 77104 Submitted by: Martin Birgmeier martin at email dot aon dot at MFC after: 3 days
This commit is contained in:
parent
b9f5e42283
commit
23417e56ea
@ -455,7 +455,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)));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user