patches/firefox3-07-fix-mimetype-for-helper-app.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 17060 7620508144e5
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446

diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
@@ -1620,23 +1620,19 @@ nsOSHelperAppService::GetMIMEInfoFromOS(
   PRBool hasDefault = PR_FALSE;
   if (retval)
     retval->GetHasDefaultHandler(&hasDefault);
   if (!retval || !hasDefault) {
     nsRefPtr<nsMIMEInfoBase> miByExt = GetFromExtension(PromiseFlatCString(aFileExt));
     // If we had no extension match, but a type match, use that
     if (!miByExt && retval)
       return retval;
-    // If we had an extension match but no type match, set the mimetype and use
-    // it
+    // If we had an extension match but no type match, use it
     if (!retval && miByExt) {
-      if (!aType.IsEmpty())
-        miByExt->SetMIMEType(aType);
       miByExt.swap(retval);
-
       return retval;
     }
     // If we got nothing, make a new mimeinfo
     if (!retval) {
       *aFound = PR_FALSE;
       retval = new nsMIMEInfoUnix(aType);
       if (retval) {
         NS_ADDREF(retval);