Closed Bug 208996 Opened 22 years ago Closed 22 years ago

Remove an assertion in sec_pkcs7_decoder_start_digests().

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

References

Details

(Whiteboard: [3.7.7][3.4.4])

Attachments

(1 file)

With the recent change to secasn1d.c, an empty "group" is now decoded into an array containing only the terminating NULL pointer. So the following assertion in sec_pkcs7_decoder_start_digests() is no longer valid and should be removed. 271 /* 272 * Count the algorithms. 273 */ 274 digcnt = 0; 275 while (digestalgs[digcnt] != NULL) 276 digcnt++; 277 278 /* 279 * No algorithms means no work to do. 280 * This is not expected, so cause an assert. 281 * But if it does happen, just act as if there were 282 * no algorithms specified. 283 */ 284 PORT_Assert (digcnt != 0); 285 if (digcnt == 0) 286 return SECSuccess; Note that the code does the right thing when digcnt is 0.
Attached patch Proposed patchSplinter Review
Attachment #125364 - Flags: review?(nelsonb)
Attachment #125364 - Flags: review?(nelsonb) → review+
Status: NEW → ASSIGNED
Whiteboard: [3.7.7]
This bug is related to the fix for 174885
Depends on: 174885
Patch checked into the tip (3.9), NSS_3_8_BRANCH (3.8.1), and NSS_3_7_BRANCH (3.7.7).
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.8.1
Patch checked in on the NSS_3_4_BRANCH (3.4.4).
Whiteboard: [3.7.7] → [3.7.7][3.4.4]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: