crypto/bn/bn_print.c:236: 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:213:10: Assignment
211.       }
212.   
213.       for (i = 0; i <= (INT_MAX/4) && isdigit((unsigned char)a[i]); i++)
                ^
214.           continue;
215.   

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

crypto/bn/bn_lcl.h:660:1: <LHS trace>
658.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
659.   
660. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
661.   {
662.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lcl.h:660:1: Parameter `bits`
  658.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
  659.   
  660. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
  661.   {
  662.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lcl.h:665:9: Binary operation: ([4, 2147483584] + 64):signed32 by call to `bn_expand` 
  663.           return NULL;
  664.   
  665.       if (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax)
                 ^
  666.           return a;
  667.   

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 (--i >= 0) {\n        l *= 10;\n        l += *a - '0';\n        a++;\n        if (++j == BN_DEC_NUM) {\n            if (!BN_mul_word(ret, BN_DEC_CONV)\n                || !BN_add_word(ret, l))\n                goto err;\n            l = 0;\n            j = 0;\n        }\n    }\n    bn_correct_top(ret);\n    *bn = ret;\n    bn_check_top(ret);\n    if (ret->top != 0)\n        ret->neg = neg;\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}']