crypto/sm2/sm2_crypt.c:101: error: INTEGER_OVERFLOW_L2
  ([2, 2147483646] + [0, 2147483644]):signed32 by call to `ASN1_object_size`.
Showing all 10 steps of the trace


crypto/sm2/sm2_crypt.c:89:1: Parameter `digest->md_size`
87.   }
88.   
89. > int sm2_ciphertext_size(const EC_KEY *key, const EVP_MD *digest, size_t msg_len,
90.                           size_t *ct_size)
91.   {

crypto/sm2/sm2_crypt.c:93:25: Call
91.   {
92.       const size_t field_size = ec_field_size(EC_KEY_get0_group(key));
93.       const int md_size = EVP_MD_size(digest);
                              ^
94.       size_t sz;
95.   

crypto/evp/evp_lib.c:317:9: Assignment
  315.       if (!md) {
  316.           EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL);
  317.           return -1;
                 ^
  318.       }
  319.       return md->md_size;

crypto/sm2/sm2_crypt.c:93:5: Assignment
91.   {
92.       const size_t field_size = ec_field_size(EC_KEY_get0_group(key));
93.       const int md_size = EVP_MD_size(digest);
          ^
94.       size_t sz;
95.   

crypto/sm2/sm2_crypt.c:101:12: Call
99.       /* Integer and string are simple type; set constructed = 0, means primitive and definite length encoding. */
100.       sz = 2 * ASN1_object_size(0, field_size + 1, V_ASN1_INTEGER)
101.            + ASN1_object_size(0, md_size, V_ASN1_OCTET_STRING)
                  ^
102.            + ASN1_object_size(0, msg_len, V_ASN1_OCTET_STRING);
103.       /* Sequence is structured type; set constructed = 1, means constructed and definite length encoding. */

crypto/asn1/asn1_lib.c:215:1: <LHS trace>
213.   }
214.   
215. > int ASN1_object_size(int constructed, int length, int tag)
216.   {
217.       int ret = 1;

crypto/asn1/asn1_lib.c:215:1: Parameter `length`
  213.   }
  214.   
  215. > int ASN1_object_size(int constructed, int length, int tag)
  216.   {
  217.       int ret = 1;

crypto/asn1/asn1_lib.c:215:1: <RHS trace>
213.   }
214.   
215. > int ASN1_object_size(int constructed, int length, int tag)
216.   {
217.       int ret = 1;

crypto/asn1/asn1_lib.c:215:1: Parameter `length`
  213.   }
  214.   
  215. > int ASN1_object_size(int constructed, int length, int tag)
  216.   {
  217.       int ret = 1;

crypto/asn1/asn1_lib.c:240:5: Binary operation: ([2, 2147483646] + [0, 2147483644]):signed32 by call to `ASN1_object_size` 
  238.       if (ret >= INT_MAX - length)
  239.           return -1;
  240.       return ret + length;
             ^
  241.   }
  242.   
