forked from pool/MozillaFirefox
54fa2b53dd
* MFSA 2012-01/CVE-2012-0442/CVE-2012-0443 Miscellaneous memory safety hazards * MFSA 2012-03/CVE-2012-0445 (bmo#701071) <iframe> element exposed across domains via name attribute * MFSA 2012-04/CVE-2011-3659 (bmo#708198) Child nodes from nsDOMAttribute still accessible after removal of nodes * MFSA 2012-05/CVE-2012-0446 (bmo#705651) Frame scripts calling into untrusted objects bypass security checks * MFSA 2012-06/CVE-2012-0447 (bmo#710079) Uninitialized memory appended when encoding icon images may cause information disclosure * MFSA 2012-07/CVE-2012-0444 (bmo#719612) Potential Memory Corruption When Decoding Ogg Vorbis files * MFSA 2012-08/CVE-2012-0449 (bmo#701806, bmo#702466) Crash with malformed embedded XSLT stylesheets - KDE integration has been disabled since it needs refactoring - removed obsolete ppc64 patch - Disable neon for arm as it doesn't build correctly OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=252
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
From: Ubuntu
|
|
Subject: introduce a pref to prefer certain plugins for mime-types
|
|
|
|
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
|
|
--- a/dom/plugins/base/nsPluginHost.cpp
|
|
+++ b/dom/plugins/base/nsPluginHost.cpp
|
|
@@ -1580,17 +1580,48 @@ nsPluginHost::FindPluginForType(const ch
|
|
bool aCheckEnabled)
|
|
{
|
|
if (!aMimeType) {
|
|
return nsnull;
|
|
}
|
|
|
|
LoadPlugins();
|
|
|
|
+ nsresult res;
|
|
+ nsCOMPtr<nsIPrefBranch> prefB (do_QueryInterface(mPrefService));
|
|
+
|
|
+ char *preferredPluginPath = NULL;
|
|
+ nsCAutoString mimetypePrefString ("modules.plugins.mimetype.");
|
|
+ mimetypePrefString.Append(aMimeType);
|
|
+ const char *mimetypePrefChar = mimetypePrefString.get();
|
|
+ res = prefB->GetCharPref(mimetypePrefChar, &preferredPluginPath);
|
|
+
|
|
+ if(!NS_SUCCEEDED(res)) preferredPluginPath = NULL;
|
|
+
|
|
nsPluginTag *plugin = mPlugins;
|
|
+ if(preferredPluginPath) {
|
|
+ while (nsnull != plugin) {
|
|
+ if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) ||
|
|
+ 0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) {
|
|
+ return plugin;
|
|
+ }
|
|
+ plugin = plugin->mNext;
|
|
+ }
|
|
+
|
|
+ // now lets search for substrings
|
|
+ plugin = mPlugins;
|
|
+ while (nsnull != plugin) {
|
|
+ if (nsnull != PL_strstr(plugin->mFileName.get(), preferredPluginPath) ||
|
|
+ nsnull != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) {
|
|
+ return plugin;
|
|
+ }
|
|
+ plugin = plugin->mNext;
|
|
+ }
|
|
+ }
|
|
+
|
|
while (plugin) {
|
|
if (!aCheckEnabled || plugin->IsEnabled()) {
|
|
PRInt32 mimeCount = plugin->mMimeTypes.Length();
|
|
for (PRInt32 i = 0; i < mimeCount; i++) {
|
|
if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) {
|
|
return plugin;
|
|
}
|
|
}
|