Closed
Bug 288728
Opened 20 years ago
Closed 19 years ago
NSSCMSRecipientID_BrandNew not handled in nss_cms_recipients_traverse
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11
People
(Reporter: julien.pierre, Assigned: wtc)
References
Details
Attachments
(1 file)
2.97 KB,
patch
|
julien.pierre
:
review+
rrelyea
:
superreview+
|
Details | Diff | Splinter Review |
IMO, the following compiler warning warrants its own a bug. I'm not sure what
the correct handling is for this case.
cmsreclist.c: In function `nss_cms_recipients_traverse':
cmsreclist.c:85: warning: enumeration value `NSSCMSRecipientID_BrandNew' not
handled in switch
Reporter | ||
Updated•20 years ago
|
Priority: -- → P2
Target Milestone: --- → 3.10
Updated•19 years ago
|
QA Contact: bishakhabanerjee → jason.m.reid
Assignee | ||
Comment 1•19 years ago
|
||
I think the fix is to add a "default" case to that
switch statement and handle that as invalid input.
NSSCMSRecipientID_BrandNew is only used as an argument
to nss_cmsrecipientinfo_create, but nss_cmsrecipientinfo_create
doesn't store the NSSCMSRecipientID_BrandNew value anywhere.
Also, the value of NSSCMSRecipientID_BrandNew is 2, so
if any structure field of the type NSSCMSRecipientIDSelector
is initialized to 0 (by a PORT_ZAlloc or PORT_ArenaZAlloc
call) and not assigned a value, its value will be
NSSCMSRecipientID_IssuerSN (0).
While doing the code review, I fixed two assertions in cmsrecinfo.c
to use a whitelist instead of a blacklist.
Attachment #196219 -
Flags: review?(julien.pierre.bugs)
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Priority: P2 → P3
Target Milestone: 3.10 → 3.11
Reporter | ||
Updated•19 years ago
|
Attachment #196219 -
Flags: review?(julien.pierre.bugs) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #196219 -
Flags: superreview?(rrelyea)
Comment 2•19 years ago
|
||
Comment on attachment 196219 [details] [diff] [review]
Proposed patch
sr=relyea
Attachment #196219 -
Flags: superreview?(rrelyea) → superreview+
Assignee | ||
Comment 3•19 years ago
|
||
Patch checked in on the NSS trunk for NSS 3.11.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•