crypto/lhash/lhash.c:372: error: INTEGER_OVERFLOW_L2
  ([0, `lh->pmax`] - 1):unsigned32.
Showing all 4 steps of the trace


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->pmax`
352.   }
353.   
354. > static void contract(_LHASH *lh)
355.   {
356.       LHASH_NODE **n, *n1, *np;

crypto/lhash/lhash.c:371:9: Assignment
369.           lh->num_contract_reallocs++;
370.           lh->num_alloc_nodes /= 2;
371.           lh->pmax /= 2;
               ^
372.           lh->p = lh->pmax - 1;
373.           lh->b = n;

crypto/lhash/lhash.c:372:9: Binary operation: ([0, lh->pmax] - 1):unsigned32
370.           lh->num_alloc_nodes /= 2;
371.           lh->pmax /= 2;
372.           lh->p = lh->pmax - 1;
               ^
373.           lh->b = n;
374.       } else

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 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}']