~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to crypto/asn1/tasn_dec.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2006-05-15 16:00:58 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20060515160058-pg6lnbkkpkwpdj2e
Tags: upstream-0.9.8b
ImportĀ upstreamĀ versionĀ 0.9.8b

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
B_ASN1_OCTET_STRING,    0,      0,              B_ASN1_UNKNOWN,/* tags  4- 7 */
99
99
B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN,/* tags  8-11 */
100
100
B_ASN1_UTF8STRING,B_ASN1_UNKNOWN,B_ASN1_UNKNOWN,B_ASN1_UNKNOWN,/* tags 12-15 */
101
 
0,      0,      B_ASN1_NUMERICSTRING,B_ASN1_PRINTABLESTRING,   /* tags 16-19 */
 
101
B_ASN1_SEQUENCE,0,B_ASN1_NUMERICSTRING,B_ASN1_PRINTABLESTRING, /* tags 16-19 */
102
102
B_ASN1_T61STRING,B_ASN1_VIDEOTEXSTRING,B_ASN1_IA5STRING,       /* tags 20-22 */
103
103
B_ASN1_UTCTIME, B_ASN1_GENERALIZEDTIME,                        /* tags 23-24 */ 
104
104
B_ASN1_GRAPHICSTRING,B_ASN1_ISO64STRING,B_ASN1_GENERALSTRING,  /* tags 25-27 */
158
158
        const ASN1_EXTERN_FUNCS *ef;
159
159
        const ASN1_AUX *aux = it->funcs;
160
160
        ASN1_aux_cb *asn1_cb;
161
 
        const unsigned char *p, *q;
 
161
        const unsigned char *p = NULL, *q;
162
162
        unsigned char *wp=NULL; /* BIG FAT WARNING!  BREAKS CONST WHERE USED */
163
163
        unsigned char imphack = 0, oclass;
164
164
        char seq_eoc, seq_nolen, cst, isopt;
283
283
                        {
284
284
                        wp = *(unsigned char **)in;
285
285
                        imphack = *wp;
 
286
                        if (p == NULL)
 
287
                                {
 
288
                                ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
 
289
                                        ERR_R_NESTED_ASN1_ERROR);
 
290
                                goto err;
 
291
                                }
286
292
                        *wp = (unsigned char)((*p & V_ASN1_CONSTRUCTED)
287
293
                                                                | it->utype);
288
294
                        }
924
930
                if (!*pval)
925
931
                        {
926
932
                        typ = ASN1_TYPE_new();
 
933
                        if (typ == NULL)
 
934
                                goto err;
927
935
                        *pval = (ASN1_VALUE *)typ;
928
936
                        }
929
937
                else
1167
1175
                        return 0;
1168
1176
#endif
1169
1177
                        }
1170
 
                else if (!collect_data(buf, &p, plen))
 
1178
                else if (plen && !collect_data(buf, &p, plen))
1171
1179
                        return 0;
1172
1180
                len -= p - q;
1173
1181
                }