Closed Bug 632657 Opened 13 years ago Closed 13 years ago

SEC_ASN1IsTemplateSimple may treat choice templates as simple

Categories

(NSS :: Libraries, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: briansmith, Assigned: briansmith)

Details

Attachments

(1 file)

The code says (in secasn1u.c):

    if (!theTemplate->kind & SEC_ASN1_CHOICE) {

What is really meant is:

    if (!(theTemplate->kind & SEC_ASN1_CHOICE)) {

Note that (!) has higher precedence than (&).
Attached patch Proposed patchSplinter Review
I rediscovered this bug when going over the compiler
warnings in NSS 3.13.  I agree with your analysis
and proposed fix.
Attachment #560090 - Flags: review?(bsmith)
Patch checked in on the NSS trunk (NSS 3.13).

Checking in secasn1u.c;
/cvsroot/mozilla/security/nss/lib/util/secasn1u.c,v  <--  secasn1u.c
new revision: 1.5; previous revision: 1.4
done
Assignee: nobody → bsmith
Status: NEW → RESOLVED
Closed: 13 years ago
OS: Windows 7 → All
Priority: -- → P2
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 3.13
Attachment #560090 - Flags: review?(bsmith) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: