crypto/bn/bn_print.c:232: error: INTEGER_OVERFLOW_L2
  ([4, 2147483584] + 64):signed32 by call to `bn_expand`.
Showing all 5 steps of the trace


crypto/bn/bn_print.c:209:10: Assignment
207.       }
208.   
209.       for (i = 0; i <= (INT_MAX/4) && isdigit((unsigned char)a[i]); i++)
                ^
210.           continue;
211.   

crypto/bn/bn_print.c:232:9: Call
230.   
231.       /* i is the number of digits, a bit of an over expand */
232.       if (bn_expand(ret, i * 4) == NULL)
               ^
233.           goto err;
234.   

crypto/bn/bn_lcl.h:676:1: <LHS trace>
674.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
675.   
676. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
677.   {
678.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lcl.h:676:1: Parameter `bits`
  674.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
  675.   
  676. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
  677.   {
  678.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lcl.h:681:8: Binary operation: ([4, 2147483584] + 64):signed32 by call to `bn_expand` 
  679.           return NULL;
  680.   
  681.       if(((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax)
                ^
  682.           return a;
  683.   

static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
{
    if (bits > (INT_MAX - BN_BITS2 + 1))
        return NULL;
    if(((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax)
        return a;
    return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
}
["int BN_dec2bn(BIGNUM **bn, const char *a)\n{\n    BIGNUM *ret = NULL;\n    BN_ULONG l = 0;\n    int neg = 0, i, j;\n    int num;\n    if ((a == NULL) || (*a == '\\0'))\n        return (0);\n    if (*a == '-') {\n        neg = 1;\n        a++;\n    }\n    for (i = 0; i <= (INT_MAX/4) && isdigit((unsigned char)a[i]); i++)\n        continue;\n    if (i == 0 || i > INT_MAX/4)\n        goto err;\n    num = i + neg;\n    if (bn == NULL)\n        return (num);\n    if (*bn == NULL) {\n        if ((ret = BN_new()) == NULL)\n            return (0);\n    } else {\n        ret = *bn;\n        BN_zero(ret);\n    }\n    if (bn_expand(ret, i * 4) == NULL)\n        goto err;\n    j = BN_DEC_NUM - (i % BN_DEC_NUM);\n    if (j == BN_DEC_NUM)\n        j = 0;\n    l = 0;\n    while (*a) {\n        l *= 10;\n        l += *a - '0';\n        a++;\n        if (++j == BN_DEC_NUM) {\n            BN_mul_word(ret, BN_DEC_CONV);\n            BN_add_word(ret, l);\n            l = 0;\n            j = 0;\n        }\n    }\n    ret->neg = neg;\n    bn_correct_top(ret);\n    *bn = ret;\n    bn_check_top(ret);\n    return (num);\n err:\n    if (*bn == NULL)\n        BN_free(ret);\n    return (0);\n}", 'static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)\n{\n    if (bits > (INT_MAX - BN_BITS2 + 1))\n        return NULL;\n    if(((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax)\n        return a;\n    return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);\n}']