Bug 632657: SEC_ASN1IsTemplateSimple may incorrectly treat choice templates

as simple.  Patch by Brian Smith <bsmith@mozilla.com>.  r=wtc.


git-svn-id: svn://10.0.0.236/trunk@262944 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%google.com 2011-10-01 00:39:15 +00:00
parent 93a9d52a1e
commit c725a10985

View File

@ -37,7 +37,7 @@
/*
* Utility routines to complement the ASN.1 encoding and decoding functions.
*
* $Id: secasn1u.c,v 1.4 2005-04-09 05:06:34 julien.pierre.bugs%sun.com Exp $
* $Id: secasn1u.c,v 1.5 2011-10-01 00:39:15 wtc%google.com Exp $
*/
#include "secasn1.h"
@ -118,7 +118,7 @@ PRBool SEC_ASN1IsTemplateSimple(const SEC_ASN1Template *theTemplate)
if (! (theTemplate->kind & (~SEC_ASN1_TAGNUM_MASK))) {
return PR_TRUE; /* primitive type */
}
if (!theTemplate->kind & SEC_ASN1_CHOICE) {
if (!(theTemplate->kind & SEC_ASN1_CHOICE)) {
return PR_FALSE; /* no choice means not simple */
}
while (++theTemplate && theTemplate->kind) {