crypto/err/err.c:433: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `lh_delete`.
Showing all 6 steps of the trace


crypto/err/err.c:433:9: Call
431.   
432.       CRYPTO_w_lock(CRYPTO_LOCK_ERR);
433.       p = lh_ERR_STRING_DATA_delete(hash, d);
               ^
434.       CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
435.   

crypto/lhash/lhash.c:213:1: Parameter `lh->pmax`
  211.   }
  212.   
  213. > void *lh_delete(_LHASH *lh, const void *data)
  214.   {
  215.       unsigned long hash;

crypto/lhash/lhash.c:236:9: Call
  234.       if ((lh->num_nodes > MIN_NODES) &&
  235.           (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  236.           contract(lh);
                 ^
  237.   
  238.       return (ret);

crypto/lhash/lhash.c:354:1: <LHS trace>
352.   }
353.   
354. > static void contract(_LHASH *lh)
355.   {
356.       LHASH_NODE **n, *n1, *np;

crypto/lhash/lhash.c:354:1: Parameter `lh->p`
    352.   }
    353.   
    354. > static void contract(_LHASH *lh)
    355.   {
    356.       LHASH_NODE **n, *n1, *np;

crypto/lhash/lhash.c:358:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `lh_delete` 
    356.       LHASH_NODE **n, *n1, *np;
    357.   
    358.       np = lh->b[lh->p + lh->pmax - 1];
                    ^
    359.       lh->b[lh->p + lh->pmax - 1] = NULL; /* 24/07-92 - eay - weird but :-( */
    360.       if (lh->p == 0) {

static void contract(_LHASH *lh)
{
    LHASH_NODE **n, *n1, *np;
    np = lh->b[lh->p + lh->pmax - 1];
    lh->b[lh->p + lh->pmax - 1] = NULL;
    if (lh->p == 0) {
        n = (LHASH_NODE **)OPENSSL_realloc(lh->b,
                                           (unsigned int)(sizeof(LHASH_NODE *)
                                                          * lh->pmax));
        if (n == NULL) {
            lh->error++;
            return;
        }
        lh->num_contract_reallocs++;
        lh->num_alloc_nodes /= 2;
        lh->pmax /= 2;
        lh->p = lh->pmax - 1;
        lh->b = n;
    } else
        lh->p--;
    lh->num_nodes--;
    lh->num_contracts++;
    n1 = lh->b[(int)lh->p];
    if (n1 == NULL)
        lh->b[(int)lh->p] = np;
    else {
        while (n1->next != NULL)
            n1 = n1->next;
        n1->next = np;
    }
}
['static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *d)\n{\n    ERR_STRING_DATA *p;\n    LHASH_OF(ERR_STRING_DATA) *hash;\n    err_fns_check();\n    hash = ERRFN(err_get) (0);\n    if (!hash)\n        return NULL;\n    CRYPTO_w_lock(CRYPTO_LOCK_ERR);\n    p = lh_ERR_STRING_DATA_delete(hash, d);\n    CRYPTO_w_unlock(CRYPTO_LOCK_ERR);\n    return p;\n}', 'void *lh_delete(_LHASH *lh, const void *data)\n{\n    unsigned long hash;\n    LHASH_NODE *nn, **rn;\n    void *ret;\n    lh->error = 0;\n    rn = getrn(lh, data, &hash);\n    if (*rn == NULL) {\n        lh->num_no_delete++;\n        return (NULL);\n    } else {\n        nn = *rn;\n        *rn = nn->next;\n        ret = nn->data;\n        OPENSSL_free(nn);\n        lh->num_delete++;\n    }\n    lh->num_items--;\n    if ((lh->num_nodes > MIN_NODES) &&\n        (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))\n        contract(lh);\n    return (ret);\n}', 'static void contract(_LHASH *lh)\n{\n    LHASH_NODE **n, *n1, *np;\n    np = lh->b[lh->p + lh->pmax - 1];\n    lh->b[lh->p + lh->pmax - 1] = NULL;\n    if (lh->p == 0) {\n        n = (LHASH_NODE **)OPENSSL_realloc(lh->b,\n                                           (unsigned int)(sizeof(LHASH_NODE *)\n                                                          * lh->pmax));\n        if (n == NULL) {\n            lh->error++;\n            return;\n        }\n        lh->num_contract_reallocs++;\n        lh->num_alloc_nodes /= 2;\n        lh->pmax /= 2;\n        lh->p = lh->pmax - 1;\n        lh->b = n;\n    } else\n        lh->p--;\n    lh->num_nodes--;\n    lh->num_contracts++;\n    n1 = lh->b[(int)lh->p];\n    if (n1 == NULL)\n        lh->b[(int)lh->p] = np;\n    else {\n        while (n1->next != NULL)\n            n1 = n1->next;\n        n1->next = np;\n    }\n}']