Problem: When sorting zero elements a NULL pointer is passed to qsort(),
which ubsan warns for.
Solution: Don't call qsort() if there are no elements. (Dominique Pelle)
}
}
- /* sort on total time */
- qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T),
+ /* Sort on total time. Skip if there are no items to avoid passing NULL
+ * pointer to qsort(). */
+ if (ga.ga_len > 1)
+ qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T),
syn_compare_syntime);
MSG_PUTS_TITLE(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"));
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 155,
/**/
154,
/**/