Closed Bug 211263 Opened 21 years ago Closed 21 years ago

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

Categories

(Core :: Security: CAPS, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: timeless, Assigned: caillon)

References

()

Details

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     }
Fixed by checkin to bug 83536.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
vrfy fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.