Closed Bug 618798 Opened 12 years ago Closed 9 years ago

add /* fall through */ comment to case SEC_OID_PKCS12_V1_PKCS8_SHROUDED_KEY_BAG_ID in SEC_PKCS12DecoderIterateNext switch

Categories

(NSS :: Libraries, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.15.2

People

(Reporter: timeless, Assigned: Cykesiopka)

References

()

Details

(Keywords: coverity)

Attachments

(1 file)

3104 SEC_PKCS12DecoderIterateNext(SEC_PKCS12DecoderContext *p12dcx,
3106 {
3134     for (; p12dcx->iteration < p12dcx->safeBagCount; p12dcx->iteration++) {
3139         p12dcx->decitem.type = SECOID_FindOIDTag(&(bag->safeBagType));
3140         switch(p12dcx->decitem.type) {
3141             case SEC_OID_PKCS12_V1_CERT_BAG_ID:
3142                 p12dcx->decitem.der = sec_pkcs12_get_der_cert(bag);
3143                 p12dcx->decitem.friendlyName = sec_pkcs12_get_friendlyName(bag);
3144                 p12dcx->decitem.hasKey = sec_pkcs12_bagHasKey(p12dcx, bag);
3145                 break;
3146             case SEC_OID_PKCS12_V1_PKCS8_SHROUDED_KEY_BAG_ID:
3147                 p12dcx->decitem.shroudAlg = PORT_ZNew(SECAlgorithmID);
3148                 if (p12dcx->decitem.shroudAlg) {
3149                     SECOID_CopyAlgorithmID(NULL, p12dcx->decitem.shroudAlg,
3150                         &bag->safeBagContent.pkcs8ShroudedKeyBag->algorithm);
3151                 }

this code is intentionally falling into the next case, if there was a comment here, it would help coverity understand this and differentiate it from the previous bug i filed which was actually a bug found by the same analysis.

3152             case SEC_OID_PKCS12_V1_KEY_BAG_ID:
3153                 p12dcx->decitem.friendlyName = sec_pkcs12_get_friendlyName(bag);
3154                 break;
Attached patch Proposed PatchSplinter Review
Attachment #768496 - Flags: review?(rrelyea)
Comment on attachment 768496 [details] [diff] [review]
Proposed Patch

r+ rrelyea
Attachment #768496 - Flags: review?(rrelyea) → review+
Status: NEW → ASSIGNED
Keywords: checkin-needed
Assignee: nobody → cykesiopka.bmo
Thank you.
https://hg.mozilla.org/projects/nss/rev/d034e87563e4
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.15.2
You need to log in before you can comment on or make changes to this bug.