diff options
author | René Scharfe <l.s.r@web.de> | 2020-11-17 22:59:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-18 14:15:58 -0800 |
commit | a1c74791d5ffaa6d723abb14cebf556499c3c4cb (patch) | |
tree | 172fbfdecf391c76ecd71d6ca78f24d366e8aa86 /trace2 | |
parent | Sixth batch (diff) | |
download | tgif-a1c74791d5ffaa6d723abb14cebf556499c3c4cb.tar.xz |
gc: fix cast in compare_tasks_by_selection()
compare_tasks_by_selection() is used with QSORT and gets passed pointers
to the elements of "static struct maintenance_task tasks[]". It casts
the *addresses* of these passed pointers to element pointers, though,
and thus effectively compares some unrelated values from the stack. Fix
the casts to actually compare array elements.
Detected by USan (make SANITIZE=undefined test).
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2')
0 files changed, 0 insertions, 0 deletions