Bug 1505911 - Follow-up: fix error in part 1. r=valentin
authorJorg K <jorgk@jorgk.com>
Sun, 02 Dec 2018 07:13:50 +0100
changeset 508377 0ad042243cf0ea701257465d72e780d4dbfc0225
parent 508376 c120724df998b9590951b54fad6049595ecda0cb
child 508378 8e021c409c6a16d9bab9713d20e30fa05c5b8365
child 508414 a17e7caad4470179473f9058e4ad17e72462eb73
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1505911
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505911 - Follow-up: fix error in part 1. r=valentin
netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -324,17 +324,17 @@ void mozTXTToHTMLConv::CalculateURLBound
 
   EscapeStr(desc, false);
 
   txtURL.Append(&aInString[start], end - start + 1);
   txtURL.StripWhitespace();
 
   // FIX ME
   nsAutoString temp2;
-  ScanTXT(nsDependentSubstring(aInString, descstart),
+  ScanTXT(nsDependentSubstring(&aInString[descstart], pos - descstart),
           ~kURLs /*prevents loop*/ & whathasbeendone, temp2);
   replaceBefore = temp2.Length();
 }
 
 bool mozTXTToHTMLConv::ShouldLinkify(const nsCString& aURL) {
   if (!mIOService) return false;
 
   nsAutoCString scheme;