test/sm2crypttest.c:204: error: BUFFER_OVERRUN_L2
  Offset: [-15, 536870911] (⇐ [0, 1] + [-15, 536870910]) Size: 2 by call to `create_EC_group`.
Showing all 9 steps of the trace


test/sm2crypttest.c:204:9: Call
202.       int rc;
203.       EC_GROUP *test_group =
204.           create_EC_group
               ^
205.           ("8542D69E4C044F18E8B92435BF6FF7DE457283915C45517D722EDB8B08F1DFC3",
206.            "787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E498",

test/sm2crypttest.c:74:1: Parameter `*cof_hex`
  72.   }
  73.   
  74. > static EC_GROUP *create_EC_group(const char *p_hex, const char *a_hex,
  75.                                    const char *b_hex, const char *x_hex,
  76.                                    const char *y_hex, const char *order_hex,

test/sm2crypttest.c:116:5: Call
  114.   
  115.       BN_hex2bn(&order, order_hex);
  116.       BN_hex2bn(&cof, cof_hex);
             ^
  117.   
  118.       if (EC_GROUP_set_generator(group, generator, order, cof) == 0)

crypto/bn/bn_print.c:141:10: <Offset trace>
139.       }
140.   
141.       for (i = 0; i <= INT_MAX / 4 && ossl_isxdigit(a[i]); i++)
                ^
142.           continue;
143.   

crypto/bn/bn_print.c:141:10: Assignment
    139.       }
    140.   
    141.       for (i = 0; i <= INT_MAX / 4 && ossl_isxdigit(a[i]); i++)
                    ^
    142.           continue;
    143.   

crypto/bn/bn_print.c:164:5: Assignment
    162.           goto err;
    163.   
    164.       j = i;                      /* least significant 'hex' */
               ^
    165.       m = 0;
    166.       h = 0;

crypto/bn/bn_print.c:126:1: <Length trace>
124.   }
125.   
126. > int BN_hex2bn(BIGNUM **bn, const char *a)
127.   {
128.       BIGNUM *ret = NULL;

crypto/bn/bn_print.c:126:1: Parameter `*a`
    124.   }
    125.   
    126. > int BN_hex2bn(BIGNUM **bn, const char *a)
    127.   {
    128.       BIGNUM *ret = NULL;

crypto/bn/bn_print.c:171:17: Array access: Offset: [-15, 536870911] (⇐ [0, 1] + [-15, 536870910]) Size: 2 by call to `create_EC_group` 
    169.           l = 0;
    170.           for (;;) {
    171.               c = a[j - m];
                           ^
    172.               k = OPENSSL_hexchar2int(c);
    173.               if (k < 0)
