Closed
Bug 949615
Opened 11 years ago
Closed 10 years ago
Delete unreachable code in ssl_DestroySID and ssl_LookupSID lib/ssl/sslnonce.c
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.15.5
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file)
2.25 KB,
patch
|
agl
:
review+
wtc
:
checked-in+
|
Details | Diff | Splinter Review |
While looking into other bugs, I found some unreachable code in ssl_DestroySID and ssl_LookupSID lib/ssl/sslnonce.c. 1. ssl_DestroySID: In this function, sid->references must be 0. Code inspection shows that if |sid| is in the client cache, the client cache will own a reference. This implies |sid| cannot be in the client cache. So sid->cached == in_client_cache will never be true. I replaced the check with an assertion. 2. ssl_LookupSID: The function asserts sid->references >= 1, so the two !sid->references tests will always be false. Perhaps in the past NSS used to leave orphaned (reference count 0) sid's in the client cache and clean them up later.
Attachment #8346722 -
Flags: review?(agl)
Updated•11 years ago
|
Attachment #8346722 -
Flags: review?(agl) → review+
Assignee | ||
Comment 1•10 years ago
|
||
Comment on attachment 8346722 [details] [diff] [review] Patch Review of attachment 8346722 [details] [diff] [review]: ----------------------------------------------------------------- Patch checked in: https://hg.mozilla.org/projects/nss/rev/370718a90fc8
Attachment #8346722 -
Flags: checked-in+
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Target Milestone: 3.15.5 → 3.16
Assignee | ||
Updated•10 years ago
|
Target Milestone: 3.16 → 3.15.5
You need to log in
before you can comment on or make changes to this bug.
Description
•