crypto/engine/tb_dsa.c:74: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `engine_table_cleanup`.
Showing all 8 steps of the trace


crypto/engine/tb_dsa.c:74:5: Call
72.   static void engine_unregister_all_DSA(void)
73.   {
74.       engine_table_cleanup(&dsa_table);
          ^
75.   }
76.   

crypto/engine/eng_table.c:227:1: Parameter `(*table)->piles.num_nodes`
  225.   static IMPLEMENT_LHASH_DOALL_FN(int_cleanup_cb, ENGINE_PILE)
  226.   
  227. > void engine_table_cleanup(ENGINE_TABLE **table)
  228.   {
  229.       CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);

crypto/engine/eng_table.c:231:9: Call
  229.       CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
  230.       if (*table) {
  231.           lh_ENGINE_PILE_doall(&(*table)->piles,
                 ^
  232.                                LHASH_DOALL_FN(int_cleanup_cb));
  233.           lh_ENGINE_PILE_free(&(*table)->piles);

crypto/lhash/lhash.c:293:1: Parameter `lh->num_nodes`
    291.   }
    292.   
    293. > void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func)
    294.   {
    295.       doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL);

crypto/lhash/lhash.c:295:5: Call
    293.   void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func)
    294.   {
    295.       doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL);
               ^
    296.   }
    297.   

crypto/lhash/lhash.c:260:1: <LHS trace>
258.   }
259.   
260. > static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
261.                             LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
262.   {

crypto/lhash/lhash.c:260:1: Parameter `lh->num_nodes`
      258.   }
      259.   
      260. > static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
      261.                             LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
      262.   {

crypto/lhash/lhash.c:273:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `engine_table_cleanup` 
      271.        * memory leaks otherwise
      272.        */
      273.       for (i = lh->num_nodes - 1; i >= 0; i--) {
                      ^
      274.           a = lh->b[i];
      275.           while (a != NULL) {

static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
                          LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
{
    int i;
    LHASH_NODE *a, *n;
    if (lh == NULL)
        return;
    for (i = lh->num_nodes - 1; i >= 0; i--) {
        a = lh->b[i];
        while (a != NULL) {
            n = a->next;
            if (use_arg)
                func_arg(a->data, arg);
            else
                func(a->data);
            a = n;
        }
    }
}
['static void engine_unregister_all_DSA(void)\n{\n    engine_table_cleanup(&dsa_table);\n}', 'void engine_table_cleanup(ENGINE_TABLE **table)\n{\n    CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);\n    if (*table) {\n        lh_ENGINE_PILE_doall(&(*table)->piles,\n                             LHASH_DOALL_FN(int_cleanup_cb));\n        lh_ENGINE_PILE_free(&(*table)->piles);\n        *table = NULL;\n    }\n    CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);\n}', 'void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func)\n{\n    doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL);\n}', 'static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,\n                          LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)\n{\n    int i;\n    LHASH_NODE *a, *n;\n    if (lh == NULL)\n        return;\n    for (i = lh->num_nodes - 1; i >= 0; i--) {\n        a = lh->b[i];\n        while (a != NULL) {\n            n = a->next;\n            if (use_arg)\n                func_arg(a->data, arg);\n            else\n                func(a->data);\n            a = n;\n        }\n    }\n}']