Bug 1250540 - fix string-parsing regression that made screen share whitelisting stop working. r=jesup
authorJan-Ivar Bruaroey <jib@mozilla.com>
Tue, 23 Feb 2016 11:30:49 -0500
changeset 285339 8b1a92589f261739d31465457b2bea65f5a16518
parent 285338 b3d204d5c6b730c12d5d63c6b29815b7a35f4e81
child 285340 637b9871727b0f493a259c78a0b8d5397efc8441
push id72328
push userjbruaroey@mozilla.com
push dateWed, 24 Feb 2016 16:09:30 +0000
treeherdermozilla-inbound@3a0d8138b277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1250540
milestone47.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 1250540 - fix string-parsing regression that made screen share whitelisting stop working. r=jesup MozReview-Commit-ID: AKux0nBVBEF
dom/media/MediaManager.cpp
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -219,17 +219,17 @@ HostHasPermission(nsIURI &docURI)
   */
   do {
     end = domainWhiteList.FindChar(',', begin);
     if (end == (uint32_t)-1) {
       // Last or only domain name in the comma separated list
       end = domainWhiteList.Length();
     }
 
-    rv = idnService->ConvertUTF8toACE(Substring(domainWhiteList, begin, end),
+    rv = idnService->ConvertUTF8toACE(Substring(domainWhiteList, begin, end - begin),
                                       domainName);
     if (NS_SUCCEEDED(rv)) {
       if (HostInDomain(hostName, domainName)) {
         return true;
       }
     } else {
       NS_WARNING("Failed to convert UTF-8 host to ASCII");
     }