diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\asn1\a_bitstr.c openssl-0.9.8-mod\crypto\asn1\a_bitstr.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\asn1\a_bitstr.c Tue Apr 26 21:53:12 2005 +++ openssl-0.9.8-mod\crypto\asn1\a_bitstr.c Wed Jul 20 14:59:40 2005 @@ -183,9 +183,9 @@ iv= ~v; if (!value) v=0; + if (a == NULL) return(0); a->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear, set on write */ - if (a == NULL) return(0); if ((a->length < (w+1)) || (a->data == NULL)) { if (!value) return(1); /* Don't need to set */ diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\asn1\t_pkey.c openssl-0.9.8-mod\crypto\asn1\t_pkey.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\asn1\t_pkey.c Sat Jul 16 15:04:20 2005 +++ openssl-0.9.8-mod\crypto\asn1\t_pkey.c Wed Jul 20 15:33:13 2005 @@ -198,6 +198,9 @@ if (x->p) buf_len = (size_t)BN_num_bytes(x->p); + else + goto err; + if (x->q) if (buf_len < (i = (size_t)BN_num_bytes(x->q))) buf_len = i; @@ -670,6 +673,9 @@ if (x->p) buf_len = (size_t)BN_num_bytes(x->p); + else + goto err; + if (x->g) if (buf_len < (i = (size_t)BN_num_bytes(x->g))) buf_len = i; @@ -728,6 +734,9 @@ if (x->p) buf_len = (size_t)BN_num_bytes(x->p); + else + goto err; + if (x->q) if (buf_len < (i = (size_t)BN_num_bytes(x->q))) buf_len = i; diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\asn1\tasn_new.c openssl-0.9.8-mod\crypto\asn1\tasn_new.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\asn1\tasn_new.c Wed May 11 06:45:24 2005 +++ openssl-0.9.8-mod\crypto\asn1\tasn_new.c Wed Jul 20 14:57:44 2005 @@ -326,8 +326,8 @@ { ASN1_TYPE *typ; int utype; - const ASN1_PRIMITIVE_FUNCS *pf; - pf = it->funcs; + const ASN1_PRIMITIVE_FUNCS *pf=NULL; + if (it) pf = it->funcs; if (pf && pf->prim_new) return pf->prim_new(pval, it); @@ -374,8 +374,8 @@ void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) { int utype; - const ASN1_PRIMITIVE_FUNCS *pf; - pf = it->funcs; + const ASN1_PRIMITIVE_FUNCS *pf=NULL; + if (it) pf = it->funcs; if (pf) { if (pf->prim_clear) diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\ec\ec_lib.c openssl-0.9.8-mod\crypto\ec\ec_lib.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\ec\ec_lib.c Sat May 21 03:00:42 2005 +++ openssl-0.9.8-mod\crypto\ec\ec_lib.c Wed Jul 20 15:03:06 2005 @@ -145,7 +145,7 @@ { if (!group) return; - if (group->meth->group_clear_finish != 0) + if (group->meth && group->meth->group_clear_finish != 0) group->meth->group_clear_finish(group); else if (group->meth != NULL && group->meth->group_finish != 0) group->meth->group_finish(group); @@ -728,7 +728,7 @@ { if (!point) return; - if (point->meth->point_finish != 0) + if (point->meth && point->meth->point_finish != 0) point->meth->point_finish(point); OPENSSL_free(point); } @@ -738,7 +738,7 @@ { if (!point) return; - if (point->meth->point_clear_finish != 0) + if (point->meth && point->meth->point_clear_finish != 0) point->meth->point_clear_finish(point); else if (point->meth != NULL && point->meth->point_finish != 0) point->meth->point_finish(point); diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\evp\p5_crpt.c openssl-0.9.8-mod\crypto\evp\p5_crpt.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\evp\p5_crpt.c Tue Mar 16 01:15:18 2004 +++ openssl-0.9.8-mod\crypto\evp\p5_crpt.c Wed Jul 20 14:55:34 2005 @@ -114,7 +114,7 @@ const unsigned char *pbuf; /* Extract useful info from parameter */ - pbuf = param->value.sequence->data; + if (param && param->value.sequence) pbuf = param->value.sequence->data; if (!param || (param->type != V_ASN1_SEQUENCE) || !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) { EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\evp\p5_crpt2.c openssl-0.9.8-mod\crypto\evp\p5_crpt2.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\evp\p5_crpt2.c Tue Mar 16 01:15:18 2004 +++ openssl-0.9.8-mod\crypto\evp\p5_crpt2.c Wed Jul 20 14:54:26 2005 @@ -156,8 +156,10 @@ const EVP_CIPHER *cipher; PBKDF2PARAM *kdf = NULL; - pbuf = param->value.sequence->data; - plen = param->value.sequence->length; + if (param && param->value.sequence) { + pbuf = param->value.sequence->data; + plen = param->value.sequence->length; + } if(!param || (param->type != V_ASN1_SEQUENCE) || !(pbe2 = d2i_PBE2PARAM(NULL, &pbuf, plen))) { EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\ocsp\ocsp_cl.c openssl-0.9.8-mod\crypto\ocsp\ocsp_cl.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\ocsp\ocsp_cl.c Sat Feb 24 15:50:06 2001 +++ openssl-0.9.8-mod\crypto\ocsp\ocsp_cl.c Wed Jul 20 15:09:45 2005 @@ -101,6 +101,8 @@ { GENERAL_NAME *gen; gen = GENERAL_NAME_new(); + if (gen == NULL) + return 0; if (!X509_NAME_set(&gen->d.directoryName, nm)) { GENERAL_NAME_free(gen); diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\pkcs12\p12_crpt.c openssl-0.9.8-mod\crypto\pkcs12\p12_crpt.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\pkcs12\p12_crpt.c Wed May 11 06:45:32 2005 +++ openssl-0.9.8-mod\crypto\pkcs12\p12_crpt.c Wed Jul 20 14:53:22 2005 @@ -94,7 +94,7 @@ unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH]; /* Extract useful info from parameter */ - pbuf = param->value.sequence->data; + if (param && param->value.sequence) pbuf = param->value.sequence->data; if (!param || (param->type != V_ASN1_SEQUENCE) || !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) { PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN,PKCS12_R_DECODE_ERROR); diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\txt_db\txt_db.c openssl-0.9.8-mod\crypto\txt_db\txt_db.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\txt_db\txt_db.c Thu Mar 31 11:26:36 2005 +++ openssl-0.9.8-mod\crypto\txt_db\txt_db.c Wed Jul 20 15:36:20 2005 @@ -179,10 +179,13 @@ #if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) if (er == 1) fprintf(stderr,"OPENSSL_malloc failure\n"); #endif - if (ret->data != NULL) sk_free(ret->data); - if (ret->index != NULL) OPENSSL_free(ret->index); - if (ret->qual != NULL) OPENSSL_free(ret->qual); - if (ret != NULL) OPENSSL_free(ret); + if (ret != NULL) + { + if (ret->data != NULL) sk_free(ret->data); + if (ret->index != NULL) OPENSSL_free(ret->index); + if (ret->qual != NULL) OPENSSL_free(ret->qual); + OPENSSL_free(ret); + } return(NULL); } else diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\ui\ui_lib.c openssl-0.9.8-mod\crypto\ui\ui_lib.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\ui\ui_lib.c Tue May 17 03:01:48 2005 +++ openssl-0.9.8-mod\crypto\ui\ui_lib.c Wed Jul 20 15:51:30 2005 @@ -620,8 +620,10 @@ UI_METHOD *ui_method = (UI_METHOD *)OPENSSL_malloc(sizeof(UI_METHOD)); if (ui_method) + { memset(ui_method, 0, sizeof(*ui_method)); - ui_method->name = BUF_strdup(name); + ui_method->name = BUF_strdup(name); + } return ui_method; } diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\x509\x509_att.c openssl-0.9.8-mod\crypto\x509\x509_att.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\x509\x509_att.c Wed May 11 06:45:36 2005 +++ openssl-0.9.8-mod\crypto\x509\x509_att.c Wed Jul 20 16:02:55 2005 @@ -125,6 +125,8 @@ X509_ATTRIBUTE *new_attr=NULL; STACK_OF(X509_ATTRIBUTE) *sk=NULL; + if (x == NULL) + goto err2; if ((x != NULL) && (*x == NULL)) { if ((sk=sk_X509_ATTRIBUTE_new_null()) == NULL) diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\x509\x509_v3.c openssl-0.9.8-mod\crypto\x509\x509_v3.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\x509\x509_v3.c Wed Dec 04 02:16:00 2002 +++ openssl-0.9.8-mod\crypto\x509\x509_v3.c Wed Jul 20 16:03:12 2005 @@ -147,6 +147,8 @@ int n; STACK_OF(X509_EXTENSION) *sk=NULL; + if (x == NULL) + goto err2; if ((x != NULL) && (*x == NULL)) { if ((sk=sk_X509_EXTENSION_new_null()) == NULL) diff -ur openssl-0.9.8-stable-SNAP-20050720\crypto\x509v3\v3_alt.c openssl-0.9.8-mod\crypto\x509v3\v3_alt.c --- openssl-0.9.8-stable-SNAP-20050720\crypto\x509v3\v3_alt.c Wed May 11 06:45:36 2005 +++ openssl-0.9.8-mod\crypto\x509v3\v3_alt.c Wed Jul 20 14:52:47 2005 @@ -341,7 +341,7 @@ X509_NAME_ENTRY *ne; GENERAL_NAME *gen = NULL; int i; - if(ctx->flags == CTX_TEST) return 1; + if(ctx && ctx->flags == CTX_TEST) return 1; if(!ctx || (!ctx->subject_cert && !ctx->subject_req)) { X509V3err(X509V3_F_COPY_EMAIL,X509V3_R_NO_SUBJECT_DETAILS); goto err; diff -ur openssl-0.9.8-stable-SNAP-20050720\ssl\ssl_txt.c openssl-0.9.8-mod\ssl\ssl_txt.c --- openssl-0.9.8-stable-SNAP-20050720\ssl\ssl_txt.c Wed Mar 30 12:26:02 2005 +++ openssl-0.9.8-mod\ssl\ssl_txt.c Wed Jul 20 15:47:50 2005 @@ -153,7 +153,7 @@ #endif /* OPENSSL_NO_KRB5 */ if (x->compress_meth != 0) { - SSL_COMP *comp; + SSL_COMP *comp=NULL; ssl_cipher_get_evp(x,NULL,NULL,&comp); if (comp == NULL)
______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]