crypto/bn/bn_lib.c:526: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607].
Showing all 5 steps of the trace


crypto/bn/bn_lib.c:520:1: <Length trace>
518.   }
519.   
520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
521.   {
522.       bn_check_top(a);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
518.   }
519.   
520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
521.   {
522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Call
521.   {
522.       bn_check_top(a);
523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
               ^
524.           return (0);
525.       a->neg = 0;

crypto/bn/bn_lcl.h:777:1: Parameter `*a->d`
  775.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
  776.   
  777. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
  778.   {
  779.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lib.c:526:5: Array access: Offset: 0 Size: [0, 8388607]
524.           return (0);
525.       a->neg = 0;
526.       a->d[0] = w;
           ^
527.       a->top = (w ? 1 : 0);
528.       bn_check_top(a);

int BN_set_word(BIGNUM *a, BN_ULONG w)
{
    bn_check_top(a);
    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
        return (0);
    a->neg = 0;
    a->d[0] = w;
    a->top = (w ? 1 : 0);
    bn_check_top(a);
    return (1);
}
['int BN_set_word(BIGNUM *a, BN_ULONG w)\n{\n    bn_check_top(a);\n    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)\n        return (0);\n    a->neg = 0;\n    a->d[0] = w;\n    a->top = (w ? 1 : 0);\n    bn_check_top(a);\n    return (1);\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}']