Remove an assertion in sec_pkcs7_decoder_start_digests().

RESOLVED FIXED in 3.8.1

Status

NSS
Libraries
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [3.7.7][3.4.4])

Attachments

(1 attachment)

665 bytes, patch
Nelson Bolyard (seldom reads bugmail)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

14 years ago
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.
(Assignee)

Comment 1

14 years ago
Created attachment 125364 [details] [diff] [review]
Proposed patch
(Assignee)

Updated

14 years ago
Attachment #125364 - Flags: review?(nelsonb)
Attachment #125364 - Flags: review?(nelsonb) → review+
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Whiteboard: [3.7.7]
This bug is related to the fix for 174885
Depends on: 174885
(Assignee)

Comment 3

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.8.1
(Assignee)

Comment 4

14 years ago
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.