test/lhash_test.c:92: error: BUFFER_OVERRUN_L3
  Offset added: [272, +oo] (⇐ [16, +oo] + [256, +oo]) Size: [1, +oo] by call to `lh_int_insert`.
Showing all 15 steps of the trace


test/lhash_test.c:83:24: Call
81.       };
82.       const unsigned int n_dels = OSSL_NELEM(dels);
83.       LHASH_OF(int) *h = lh_int_new(&int_hash, &int_cmp);
                             ^
84.       unsigned int i;
85.       int testresult = 0, j, *p;

test/lhash_test.c:30:1: Call
  28.   #endif
  29.   
  30. > DEFINE_LHASH_OF(int);
  31.   
  32.   static int int_tests[] = { 65537, 13, 1, 3, -5, 6, 7, 4, -10, -12, -14, 22, 9,

crypto/lhash/lhash.c:55:5: Assignment
    53.       ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
    54.       ret->num_nodes = MIN_NODES / 2;
    55.       ret->num_alloc_nodes = MIN_NODES;
              ^
    56.       ret->pmax = MIN_NODES / 2;
    57.       ret->up_load = UP_LOAD;

test/lhash_test.c:92:14: Call
90.       /* insert */
91.       for (i = 0; i < n_int_tests; i++)
92.           if (!TEST_ptr_null(lh_int_insert(h, int_tests + i))) {
                   ^
93.               TEST_info("int insert %d", i);
94.               goto end;

test/lhash_test.c:30:1: Parameter `lh->num_alloc_nodes`
  28.   #endif
  29.   
  30. > DEFINE_LHASH_OF(int);
  31.   
  32.   static int int_tests[] = { 65537, 13, 1, 3, -5, 6, 7, 4, -10, -12, -14, 22, 9,

test/lhash_test.c:30:1: Call
  28.   #endif
  29.   
  30. > DEFINE_LHASH_OF(int);
  31.   
  32.   static int int_tests[] = { 65537, 13, 1, 3, -5, 6, 7, 4, -10, -12, -14, 22, 9,

crypto/lhash/lhash.c:87:1: Parameter `lh->num_alloc_nodes`
    85.   }
    86.   
    87. > void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data)
    88.   {
    89.       unsigned long hash;

crypto/lhash/lhash.c:94:77: Call
    92.   
    93.       lh->error = 0;
    94.       if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
                                                                                      ^
    95.           return NULL;        /* 'lh->error++' already done in 'expand' */
    96.   

crypto/lhash/lhash.c:203:1: <Offset trace>
201.   }
202.   
203. > static int expand(OPENSSL_LHASH *lh)
204.   {
205.       OPENSSL_LH_NODE **n, **n1, **n2, *np;

crypto/lhash/lhash.c:203:1: Parameter `lh->num_alloc_nodes`
      201.   }
      202.   
      203. > static int expand(OPENSSL_LHASH *lh)
      204.   {
      205.       OPENSSL_LH_NODE **n, **n1, **n2, *np;

crypto/lhash/lhash.c:209:5: Assignment
      207.       unsigned long hash;
      208.   
      209.       nni = lh->num_alloc_nodes;
                 ^
      210.       p = lh->p;
      211.       pmax = lh->pmax;

crypto/lhash/lhash.c:203:1: <Length trace>
201.   }
202.   
203. > static int expand(OPENSSL_LHASH *lh)
204.   {
205.       OPENSSL_LH_NODE **n, **n1, **n2, *np;

crypto/lhash/lhash.c:203:1: Parameter `lh->num_alloc_nodes`
      201.   }
      202.   
      203. > static int expand(OPENSSL_LHASH *lh)
      204.   {
      205.       OPENSSL_LH_NODE **n, **n1, **n2, *np;

crypto/lhash/lhash.c:209:5: Assignment
      207.       unsigned long hash;
      208.   
      209.       nni = lh->num_alloc_nodes;
                 ^
      210.       p = lh->p;
      211.       pmax = lh->pmax;

crypto/lhash/lhash.c:220:9: Array access: Offset added: [272, +oo] (⇐ [16, +oo] + [256, +oo]) Size: [1, +oo] by call to `lh_int_insert` 
      218.           }
      219.           lh->b = n;
      220.           memset(n + nni, 0, sizeof(*n) * (j - nni));
                     ^
      221.           lh->pmax = nni;
      222.           lh->num_alloc_nodes = j;
