pjs/security/manager
relyea%netscape.com c27b32ee74 Bug 225034 Certificate Manager Crashes Mozilla [@ nsCertTree::CmpByCrit]
sr=brendan r=wtc a=dbaron

The issue is the use of the PL_DHash* functions. It's possible that a given call
to PL_DHashOperate which adds a new entry may cause the hash table to expand,
and all the existing entries to be reallocated. PL_DHash does this by allocating
new memory, then copying the entries.

getCacheEntry() returns one of these hash entries. CmpBy() makes two consecutive
calls to getCacheEntry, then uses the returned entries for it's comparisons. If
the second entry call causes a new entry to be added to the table, and causes
the hash table to expand, the pointer to the first entry we retrieved will point
to freed memory.

The fix is to make the usable entry a pointer in the hashtable entry, and return
that pointer. When the hashtable rebuilds it's entries, the pointer will be
copied to the new entry and not be disturbed.
2005-08-15 21:23:51 +00:00
..
boot Followup changes to bzabarsky's review for bug 296639. Reviews pending, a=drivers@mozilla.org 2005-08-12 04:11:00 +00:00
locales
pki 297057 fix case of doOK() 2005-08-06 21:34:04 +00:00
ssl Bug 225034 Certificate Manager Crashes Mozilla [@ nsCertTree::CmpByCrit] 2005-08-15 21:23:51 +00:00
.cvsignore
Makefile.in Pass CC down to NSS build. 2005-06-02 02:03:05 +00:00
psm.pkg