mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 13:34:03 +00:00
Perform some sanity checks on nsMozIconURI.
This commit is contained in:
@@ -637,7 +637,17 @@ nsMozIconURI::Deserialize(const URIParams& aParams)
|
||||
mContentType = params.contentType();
|
||||
mFileName = params.fileName();
|
||||
mStockIcon = params.stockIcon();
|
||||
|
||||
if (params.iconSize() < -1 ||
|
||||
params.iconSize() >= (int32_t) ArrayLength(kSizeStrings)) {
|
||||
return false;
|
||||
}
|
||||
mIconSize = params.iconSize();
|
||||
|
||||
if (params.iconState() < -1 ||
|
||||
params.iconState() >= (int32_t) ArrayLength(kStateStrings)) {
|
||||
return false;
|
||||
}
|
||||
mIconState = params.iconState();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user