apps/ts.c:777: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_add_word`.
Showing all 22 steps of the trace


apps/ts.c:773:19: Call
771.               goto err;
772.           }
773.           if ((bn = ASN1_INTEGER_to_BN(serial, NULL)) == NULL)
                         ^
774.               goto err;
775.           ASN1_INTEGER_free(serial);

crypto/asn1/a_int.c:559:12: Call
  557.   BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn)
  558.   {
  559.       return asn1_string_to_bn(ai, bn, V_ASN1_INTEGER);
                    ^
  560.   }
  561.   

crypto/asn1/a_int.c:493:1: Parameter `bn->top`
    491.   }
    492.   
    493. > static BIGNUM *asn1_string_to_bn(const ASN1_INTEGER *ai, BIGNUM *bn,
    494.                                    int itype)
    495.   {

apps/ts.c:777:14: Call
775.           ASN1_INTEGER_free(serial);
776.           serial = NULL;
777.           if (!BN_add_word(bn, 1))
                    ^
778.               goto err;
779.           if ((serial = BN_to_ASN1_INTEGER(bn, NULL)) == NULL)

crypto/bn/bn_word.c:120:10: Assignment
  118.           return (i);
  119.       }
  120.       for (i = 0; w != 0 && i < a->top; i++) {
                  ^
  121.           a->d[i] = l = (a->d[i] + w) & BN_MASK2;
  122.           w = (w > l) ? 1 : 0;

crypto/bn/bn_word.c:125:13: Call
  123.       }
  124.       if (w && i == a->top) {
  125.           if (bn_wexpand(a, a->top + 1) == NULL)
                     ^
  126.               return 0;
  127.           a->top++;

crypto/bn/bn_lib.c:951:1: Parameter `a->top`
    949.   }
    950.   
    951. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
    952.   {
    953.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:953:37: Call
    951.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
    952.   {
    953.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                               ^
    954.   }
    955.   

crypto/bn/bn_lib.c:284:1: Parameter `b->top`
      282.    */
      283.   
      284. > BIGNUM *bn_expand2(BIGNUM *b, int words)
      285.   {
      286.       bn_check_top(b);

crypto/bn/bn_lib.c:289:23: Call
      287.   
      288.       if (words > b->dmax) {
      289.           BN_ULONG *a = bn_expand_internal(b, words);
                                   ^
      290.           if (!a)
      291.               return NULL;

crypto/bn/bn_lib.c:246:1: <Offset trace>
244.   /* This is used by bn_expand2() */
245.   /* The caller MUST check that words > b->dmax before calling this */
246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
247.   {
248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:246:1: Parameter `b->top`
        244.   /* This is used by bn_expand2() */
        245.   /* The caller MUST check that words > b->dmax before calling this */
        246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        247.   {
        248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:246:1: <Length trace>
244.   /* This is used by bn_expand2() */
245.   /* The caller MUST check that words > b->dmax before calling this */
246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
247.   {
248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:246:1: Parameter `words`
        244.   /* This is used by bn_expand2() */
        245.   /* The caller MUST check that words > b->dmax before calling this */
        246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        247.   {
        248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:263:13: Call
        261.           a = OPENSSL_secure_zalloc(words * sizeof(*a));
        262.       else
        263.           a = OPENSSL_zalloc(words * sizeof(*a));
                           ^
        264.       if (a == NULL) {
        265.           BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);

crypto/mem.c:198:1: Parameter `num`
          196.   }
          197.   
          198. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
          199.   {
          200.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:200:17: Call
          198.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
          199.   {
          200.       void *ret = CRYPTO_malloc(num, file, line);
                                 ^
          201.   
          202.       FAILTEST();

crypto/mem.c:178:9: Assignment
            176.   
            177.       if (num == 0)
            178.           return NULL;
                           ^
            179.   
            180.       FAILTEST();

crypto/mem.c:200:5: Assignment
          198.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
          199.   {
          200.       void *ret = CRYPTO_malloc(num, file, line);
                     ^
          201.   
          202.       FAILTEST();

crypto/mem.c:205:5: Assignment
          203.       if (ret != NULL)
          204.           memset(ret, 0, num);
          205.       return ret;
                     ^
          206.   }
          207.   

crypto/bn/bn_lib.c:263:9: Assignment
        261.           a = OPENSSL_secure_zalloc(words * sizeof(*a));
        262.       else
        263.           a = OPENSSL_zalloc(words * sizeof(*a));
                       ^
        264.       if (a == NULL) {
        265.           BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);

crypto/bn/bn_lib.c:271:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_add_word` 
        269.       assert(b->top <= words);
        270.       if (b->top > 0)
        271.           memcpy(a, b->d, sizeof(*a) * b->top);
                       ^
        272.   
        273.       return a;
