From dcf2ad1c79a558d4cfd68d017c0febd9a025f40d Mon Sep 17 00:00:00 2001 From: tedu Date: Fri, 18 Apr 2014 14:34:07 +0000 Subject: [PATCH] blank lines between decls and code --- lib/libcrypto/asn1/tasn_dec.c | 5 +++++ lib/libssl/src/crypto/asn1/tasn_dec.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/libcrypto/asn1/tasn_dec.c b/lib/libcrypto/asn1/tasn_dec.c index e9059df982b..f19c4571696 100644 --- a/lib/libcrypto/asn1/tasn_dec.c +++ b/lib/libcrypto/asn1/tasn_dec.c @@ -126,6 +126,7 @@ ASN1_item_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, { ASN1_TLC c; ASN1_VALUE *ptmpval = NULL; + if (!pval) pval = &ptmpval; asn1_tlc_clear_nc(&c); @@ -139,6 +140,7 @@ ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_TEMPLATE *tt) { ASN1_TLC c; + asn1_tlc_clear_nc(&c); return asn1_template_ex_d2i(pval, in, len, tt, 0, &c); } @@ -166,6 +168,7 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, int otag; int ret = 0; ASN1_VALUE **pchptr, *ptmpval; + if (!pval) return 0; if (aux && aux->asn1_cb) @@ -841,6 +844,7 @@ asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, int ret = 0; const ASN1_PRIMITIVE_FUNCS *pf; ASN1_INTEGER **tint; + pf = it->funcs; if (pf && pf->prim_c2i) @@ -1153,6 +1157,7 @@ asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *inf, int ptag, pclass; long plen; const unsigned char *p, *q; + p = *in; q = p; diff --git a/lib/libssl/src/crypto/asn1/tasn_dec.c b/lib/libssl/src/crypto/asn1/tasn_dec.c index e9059df982b..f19c4571696 100644 --- a/lib/libssl/src/crypto/asn1/tasn_dec.c +++ b/lib/libssl/src/crypto/asn1/tasn_dec.c @@ -126,6 +126,7 @@ ASN1_item_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, { ASN1_TLC c; ASN1_VALUE *ptmpval = NULL; + if (!pval) pval = &ptmpval; asn1_tlc_clear_nc(&c); @@ -139,6 +140,7 @@ ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_TEMPLATE *tt) { ASN1_TLC c; + asn1_tlc_clear_nc(&c); return asn1_template_ex_d2i(pval, in, len, tt, 0, &c); } @@ -166,6 +168,7 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, int otag; int ret = 0; ASN1_VALUE **pchptr, *ptmpval; + if (!pval) return 0; if (aux && aux->asn1_cb) @@ -841,6 +844,7 @@ asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, int ret = 0; const ASN1_PRIMITIVE_FUNCS *pf; ASN1_INTEGER **tint; + pf = it->funcs; if (pf && pf->prim_c2i) @@ -1153,6 +1157,7 @@ asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *inf, int ptag, pclass; long plen; const unsigned char *p, *q; + p = *in; q = p; -- 2.20.1