diff options
author | David Benjamin <davidben@google.com> | 2023-03-25 01:26:49 -0400 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-11 21:40:44 +0000 |
commit | a438519f9eac3ec34d82da96984eb48d237e4e97 (patch) | |
tree | c26bd96aed29dba9eb7fc37db360b9d8966f7e14 /crypto/asn1 | |
parent | bf1b79288f4339e0d87da5f8f9e2b137be4d9766 (diff) | |
download | boringssl-a438519f9eac3ec34d82da96984eb48d237e4e97.zip boringssl-a438519f9eac3ec34d82da96984eb48d237e4e97.tar.gz boringssl-a438519f9eac3ec34d82da96984eb48d237e4e97.tar.bz2 |
Fix miscellaneous size_t truncations
Also unexport PEM_proc_type and PEM_dek_info. They're never called
externally, just private functions within one file. Also, while I'm
here, fix the include guard on asn1/internal.h.
Bug: 516
Change-Id: I6961a65f638e7b464a8c349663898a954d7826b4
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/58548
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/internal.h | 6 | ||||
-rw-r--r-- | crypto/asn1/tasn_dec.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crypto/asn1/internal.h b/crypto/asn1/internal.h index 64e1e6b..5dca728 100644 --- a/crypto/asn1/internal.h +++ b/crypto/asn1/internal.h @@ -56,8 +56,8 @@ * */ -#ifndef OPENSSL_HEADER_ASN1_ASN1_LOCL_H -#define OPENSSL_HEADER_ASN1_ASN1_LOCL_H +#ifndef OPENSSL_HEADER_ASN1_INTERNAL_H +#define OPENSSL_HEADER_ASN1_INTERNAL_H #include <time.h> @@ -266,4 +266,4 @@ typedef struct ASN1_EXTERN_FUNCS_st { } // extern C #endif -#endif // OPENSSL_HEADER_ASN1_ASN1_LOCL_H +#endif // OPENSSL_HEADER_ASN1_INTERNAL_H diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 23c526e..622ed45 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -85,7 +85,7 @@ static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_TEMPLATE *tt, char opt, CRYPTO_BUFFER *buf, int depth); -static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, +static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, long len, int utype, const ASN1_ITEM *it); static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, @@ -749,7 +749,7 @@ err: // Translate ASN1 content octets into a structure -static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, +static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, long len, int utype, const ASN1_ITEM *it) { ASN1_VALUE **opval = NULL; ASN1_STRING *stmp; |