test/sm2_internal_test.c:336: error: BUFFER_OVERRUN_L2
  Offset: [0, 536870912] (⇐ [0, 1] + [0, 536870911]) Size: 2 by call to `create_EC_group`.
Showing all 8 steps of the trace


test/sm2_internal_test.c:336:9: Call
334.       /* From draft-shen-sm2-ecdsa-02 */
335.       EC_GROUP *test_group =
336.           create_EC_group
               ^
337.           ("8542D69E4C044F18E8B92435BF6FF7DE457283915C45517D722EDB8B08F1DFC3",
338.            "787968B4FA32C3FD2417842E73BBFEFF2F3C848B6831D7E0EC65228B3937E498",

test/sm2_internal_test.c:79:1: Parameter `*cof_hex`
  77.   }
  78.   
  79. > static EC_GROUP *create_EC_group(const char *p_hex, const char *a_hex,
  80.                                    const char *b_hex, const char *x_hex,
  81.                                    const char *y_hex, const char *order_hex,

test/sm2_internal_test.c:115:17: Call
  113.   
  114.       if (!TEST_true(BN_hex2bn(&order, order_hex))
  115.               || !TEST_true(BN_hex2bn(&cof, cof_hex))
                         ^
  116.               || !TEST_true(EC_GROUP_set_generator(group, generator, order, cof)))
  117.           goto done;

crypto/bn/bn_conv.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_conv.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_conv.c:126:1: <Length trace>
124.   #endif
125.   
126. > int BN_hex2bn(BIGNUM **bn, const char *a)
127.   {
128.       BIGNUM *ret = NULL;

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

crypto/bn/bn_conv.c:141:37: Array access: Offset: [0, 536870912] (⇐ [0, 1] + [0, 536870911]) Size: 2 by call to `create_EC_group` 
    139.       }
    140.   
    141.       for (i = 0; i <= INT_MAX / 4 && ossl_isxdigit(a[i]); i++)
                                               ^
    142.           continue;
    143.   
