1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 05:46:58 +00:00

[libjar] Check Jar entry names for nulls.

This commit is contained in:
Moonchild
2026-05-24 10:51:21 +02:00
committed by roytam1
parent 9179441f96
commit aadb6beb07
+5
View File
@@ -344,6 +344,11 @@ nsJARChannel::LookupFile(bool aAllowAsync)
// have e.g. spaces in their filenames.
NS_UnescapeURL(mJarEntry);
if (mJarEntry.FindChar('\0') != -1) {
// Refuse any entries with NULL in them.
return NS_ERROR_MALFORMED_URI;
}
// try to get a nsIFile directly from the url, which will often succeed.
{
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mJarBaseURI);