crypto/sm2/sm2_crypt.c:100: 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:92:31: Call
90.                           size_t *ct_size)
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;

crypto/sm2/sm2_crypt.c:46:5: Assignment
  44.       BIGNUM *a = BN_new();
  45.       BIGNUM *b = BN_new();
  46.       size_t field_size = 0;
            ^
  47.   
  48.       if (p == NULL || a == NULL || b == NULL)

crypto/sm2/sm2_crypt.c:60:5: Assignment
  58.       BN_free(b);
  59.   
  60.       return field_size;
            ^
  61.   }
  62.   

crypto/sm2/sm2_crypt.c:92:5: Assignment
90.                           size_t *ct_size)
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;

crypto/sm2/sm2_crypt.c:100:14: Call
98.   
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);

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.   
