From d1c6b7fdbdfe4a7a37ecd48a97f0796b061c2868 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Mon, 1 May 2017 22:09:48 +0000 Subject: upstream commit when freeing a bitmap, zero all it bytes; spotted by Ilya Kaliman Upstream-ID: 834ac024f2c82389d6ea6b1c7d6701b3836e28e4 --- bitmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitmap.c') diff --git a/bitmap.c b/bitmap.c index f95032250..3d7aa1379 100644 --- a/bitmap.c +++ b/bitmap.c @@ -53,8 +53,9 @@ void bitmap_free(struct bitmap *b) { if (b != NULL && b->d != NULL) { - explicit_bzero(b->d, b->len); + bitmap_zero(b); free(b->d); + b->d = NULL; } free(b); } -- cgit v1.2.3