mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1113005 - Copy only the necessary number of bytes from the source buffer; r=froydnj
--HG-- extra : rebase_source : 06c78b0ae291ac14d9433c7c7fe47907437f0da9
This commit is contained in:
parent
a522bf9f27
commit
ed9800814c
@ -505,7 +505,7 @@ nsTString_CharT::ReplaceSubstring( const self_type& aTarget, const self_type& aN
|
||||
return;
|
||||
if (oldData) {
|
||||
// Copy all of the old data to the new buffer.
|
||||
char_traits::copy(mData, oldData, XPCOM_MAX(mLength, newLength));
|
||||
char_traits::copy(mData, oldData, XPCOM_MIN(mLength, newLength));
|
||||
::ReleaseData(oldData, oldFlags);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user