DomainPolicy::DomainPolicy doesn't check the return value of PL_DHashTableInit

VERIFIED FIXED

Status

()

Core
Security: CAPS
VERIFIED FIXED
15 years ago
14 years ago

People

(Reporter: timeless, Assigned: Christopher Aillon (sabbatical, not receiving bugmail))

Tracking

Trunk
x86
Windows 2000
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
This is a code inspection bug.

QA:
To verify that this bug is fixed, make sure that all callers in of 
PL_DHashTableInit in the indicated class/file check and handle a failure return 
result.
To verify that this bug is invalid, simply verify (e.g. with lxr) that 
PL_DHashTableInit is no longer used by the indicated class/file.

PL_DHashTableInit returns a PRBool indicating whether it succeeded. 
PL_DHashTableInit *can* fail. Code can not assume that table->ops or table-
>data will be null (in fact it probably will not be), although in all 
likelyhood table->entryStore will be null it probably isn't safe to assume this.

Code at time of bug filing:

 211 class DomainPolicy : public PLDHashTable
 212 {
 213 public:
 214     DomainPolicy() : mWildcardPolicy(nsnull),
 215                      mRefCount(0)
 216
 217     {
 218         static PLDHashTableOps domainPolicyOps =
 219         {
...
 229         };
 230
 231         PL_DHashTableInit(this, &domainPolicyOps, nsnull,
 232                           sizeof(ClassPolicy), 16);
 233     }
Depends on: 83536
Fixed by checkin to bug 83536.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
(Reporter)

Comment 2

14 years ago
vrfy fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.