mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Perform some sanity checks on nsMozIconURI.
This commit is contained in:
parent
537b363cbc
commit
1b173ad9e4
1 changed files with 10 additions and 0 deletions
|
|
@ -688,7 +688,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue