diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index 98402330dbcf..850e3e2c3753 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -2018,6 +2018,16 @@ CheckVersionFlag(const nsSubstring& aFlag, const nsSubstring& aData, return PR_TRUE; } +static void +EnsureLowerCase(char *aBuf) +{ + for (; *aBuf; ++aBuf) { + char ch = *aBuf; + if (ch >= 'A' && ch <= 'Z') + *aBuf = ch + 'a' - 'A'; + } +} + nsresult nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length, nsILocalFile* aManifest, @@ -2083,6 +2093,8 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length, continue; } + EnsureLowerCase(package); + // NOTE: We check for platform and xpcnativewrappers modifiers on // content packages, but they are *applied* to content|skin|locale. @@ -2157,6 +2169,8 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length, continue; } + EnsureLowerCase(package); + TriState stAppVersion = eUnspecified; TriState stApp = eUnspecified; @@ -2205,6 +2219,8 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length, continue; } + EnsureLowerCase(package); + TriState stAppVersion = eUnspecified; TriState stApp = eUnspecified;