]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Mon, 1 May 2017 22:09:48 +0000 (22:09 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 2 May 2017 03:39:36 +0000 (13:39 +1000)
when freeing a bitmap, zero all it bytes; spotted by Ilya
Kaliman

Upstream-ID: 834ac024f2c82389d6ea6b1c7d6701b3836e28e4

bitmap.c

index f95032250e7c7fbf91bb4f494f493eb014f3eb5e..3d7aa1379598770ae2ea7fbe04971c95f1ba5ac7 100644 (file)
--- 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);
 }