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


crypto/err/err.c:545:12: Call
543.   
544.       CRYPTO_w_lock(CRYPTO_LOCK_ERR);
545.       hash = get_hash(0, 0);
                  ^
546.       if (hash) {
547.           for (; str->error; str++) {

crypto/err/err.c:279:26: Call
  277.           CRYPTO_w_lock(CRYPTO_LOCK_ERR);
  278.       if (!int_error_hash && create) {
  279.           int_error_hash = lh_ERR_STRING_DATA_new();
                                  ^
  280.       }
  281.       if (int_error_hash != NULL)

crypto/lhash/lhash.c:125:5: Assignment
    123.       ret->num_nodes = MIN_NODES / 2;
    124.       ret->num_alloc_nodes = MIN_NODES;
    125.       ret->pmax = MIN_NODES / 2;
               ^
    126.       ret->up_load = UP_LOAD;
    127.       ret->down_load = DOWN_LOAD;

crypto/err/err.c:550:19: Call
548.               if (lib)
549.                   str->error |= ERR_PACK(lib, 0, 0);
550.               (void)lh_ERR_STRING_DATA_delete(hash, str);
                         ^
551.           }
552.       }

crypto/lhash/lhash.c:189:1: Parameter `lh->pmax`
  187.   }
  188.   
  189. > void *lh_delete(_LHASH *lh, const void *data)
  190.   {
  191.       unsigned long hash;

crypto/lhash/lhash.c:212:9: Call
  210.       if ((lh->num_nodes > MIN_NODES) &&
  211.           (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  212.           contract(lh);
                 ^
  213.   
  214.       return (ret);

crypto/lhash/lhash.c:323:1: <LHS trace>
321.   }
322.   
323. > static void contract(_LHASH *lh)
324.   {
325.       LHASH_NODE **n, *n1, *np;

crypto/lhash/lhash.c:323:1: Parameter `lh->p`
    321.   }
    322.   
    323. > static void contract(_LHASH *lh)
    324.   {
    325.       LHASH_NODE **n, *n1, *np;

crypto/lhash/lhash.c:327:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `lh_delete` 
    325.       LHASH_NODE **n, *n1, *np;
    326.   
    327.       np = lh->b[lh->p + lh->pmax - 1];
                    ^
    328.       lh->b[lh->p + lh->pmax - 1] = NULL; /* 24/07-92 - eay - weird but :-( */
    329.       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 = 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;
    }
}
['void ERR_unload_strings(int lib, ERR_STRING_DATA *str)\n{\n    LHASH_OF(ERR_STRING_DATA) *hash;\n    CRYPTO_w_lock(CRYPTO_LOCK_ERR);\n    hash = get_hash(0, 0);\n    if (hash) {\n        for (; str->error; str++) {\n            if (lib)\n                str->error |= ERR_PACK(lib, 0, 0);\n            (void)lh_ERR_STRING_DATA_delete(hash, str);\n        }\n    }\n    CRYPTO_w_unlock(CRYPTO_LOCK_ERR);\n}', 'static LHASH_OF(ERR_STRING_DATA) *get_hash(int create, int lockit)\n{\n    LHASH_OF(ERR_STRING_DATA) *ret = NULL;\n    if (lockit)\n        CRYPTO_w_lock(CRYPTO_LOCK_ERR);\n    if (!int_error_hash && create) {\n        int_error_hash = lh_ERR_STRING_DATA_new();\n    }\n    if (int_error_hash != NULL)\n        ret = int_error_hash;\n    if (lockit)\n        CRYPTO_w_unlock(CRYPTO_LOCK_ERR);\n    return ret;\n}', '_LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)\n{\n    _LHASH *ret;\n    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)\n        goto err0;\n    if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)\n        goto err1;\n    ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);\n    ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);\n    ret->num_nodes = MIN_NODES / 2;\n    ret->num_alloc_nodes = MIN_NODES;\n    ret->pmax = MIN_NODES / 2;\n    ret->up_load = UP_LOAD;\n    ret->down_load = DOWN_LOAD;\n    return (ret);\n err1:\n    OPENSSL_free(ret);\n err0:\n    return (NULL);\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 = OPENSSL_realloc(lh->b,\n                            (unsigned int)(sizeof(LHASH_NODE *) * 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}']