From cad880c2df5d55e6d1652c913afd1f96636d0e5f Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Mon, 29 Jan 2024 12:56:28 -0500 Subject: [PATCH] lib: init new bitfield word after realloc Realloc doesn't init - ensure a newly-allocated word is inited. Signed-off-by: Mark Stapp --- lib/bitfield.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bitfield.h b/lib/bitfield.h index cc8c31141610..3fda627b7440 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -116,6 +116,7 @@ DECLARE_MTYPE(BITFIELD); (v).m = (v).m + 1; \ (v).data = XREALLOC(MTYPE_BITFIELD, (v).data, \ (v).m * sizeof(word_t)); \ + (v).data[(v).m - 1] = 0; \ } \ } while (0)