diff options
| author | markus <> | 2003-05-11 21:36:58 +0000 |
|---|---|---|
| committer | markus <> | 2003-05-11 21:36:58 +0000 |
| commit | 1c98a87f0daac81245653c227eb2f2508a22a965 (patch) | |
| tree | 3de6d603296ec563b936da4e6a8a1e33d48f8884 /src/lib/libcrypto/asn1/tasn_dec.c | |
| parent | 31392c89d1135cf2a416f97295f6d21681b3fbc4 (diff) | |
| download | openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.gz openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.tar.bz2 openbsd-1c98a87f0daac81245653c227eb2f2508a22a965.zip | |
import 0.9.7b (without idea and rc5)
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_dec.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index f87c08793a..76fc023230 100644 --- a/src/lib/libcrypto/asn1/tasn_dec.c +++ b/src/lib/libcrypto/asn1/tasn_dec.c | |||
| @@ -664,7 +664,7 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, unsigned char **in, long inl | |||
| 664 | if(!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL)) goto err; | 664 | if(!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL)) goto err; |
| 665 | len = buf.length; | 665 | len = buf.length; |
| 666 | /* Append a final null to string */ | 666 | /* Append a final null to string */ |
| 667 | if(!BUF_MEM_grow(&buf, len + 1)) { | 667 | if(!BUF_MEM_grow_clean(&buf, len + 1)) { |
| 668 | ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ERR_R_MALLOC_FAILURE); | 668 | ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ERR_R_MALLOC_FAILURE); |
| 669 | return 0; | 669 | return 0; |
| 670 | } | 670 | } |
| @@ -857,7 +857,7 @@ static int collect_data(BUF_MEM *buf, unsigned char **p, long plen) | |||
| 857 | int len; | 857 | int len; |
| 858 | if(buf) { | 858 | if(buf) { |
| 859 | len = buf->length; | 859 | len = buf->length; |
| 860 | if(!BUF_MEM_grow(buf, len + plen)) { | 860 | if(!BUF_MEM_grow_clean(buf, len + plen)) { |
| 861 | ASN1err(ASN1_F_COLLECT_DATA, ERR_R_MALLOC_FAILURE); | 861 | ASN1err(ASN1_F_COLLECT_DATA, ERR_R_MALLOC_FAILURE); |
| 862 | return 0; | 862 | return 0; |
| 863 | } | 863 | } |
