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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user