Closed Bug 288728 Opened 15 years ago Closed 15 years ago
ID _Brand New not handled in nss _cms _recipients _traverse
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
QA Contact: bishakhabanerjee → jason.m.reid
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)
Status: NEW → ASSIGNED
Priority: P2 → P3
Target Milestone: 3.10 → 3.11
Attachment #196219 - Flags: review?(julien.pierre.bugs) → review+
Comment on attachment 196219 [details] [diff] [review] Proposed patch sr=relyea
Attachment #196219 - Flags: superreview?(rrelyea) → superreview+
Patch checked in on the NSS trunk for NSS 3.11.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.