tree-wide: various ubsan zero size memory fixes

Fixes: #10346
This commit is contained in:
Lennart Poettering
2018-10-10 12:00:56 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent ca92fe36e0
commit 65f95765d0
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ bool bitmap_equal(Bitmap *a, Bitmap *b) {
return true;
common_n_bitmaps = MIN(a->n_bitmaps, b->n_bitmaps);
if (memcmp(a->bitmaps, b->bitmaps, sizeof(uint64_t) * common_n_bitmaps) != 0)
if (memcmp_safe(a->bitmaps, b->bitmaps, sizeof(uint64_t) * common_n_bitmaps) != 0)
return false;
c = a->n_bitmaps > b->n_bitmaps ? a : b;