From 1eb44cf0c4e004dda6d8b9c7500cd55e367cc87b Mon Sep 17 00:00:00 2001 From: Mark Nunberg Date: Mon, 11 Feb 2019 14:55:07 -0500 Subject: scrub redisContext before freeing This helps us detect use-after-free --- hiredis.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hiredis.c b/hiredis.c index 9c2788a..d28fcb9 100644 --- a/hiredis.c +++ b/hiredis.c @@ -618,6 +618,7 @@ void redisFree(redisContext *c) { if (c->ssl) { redisFreeSsl(c->ssl); } + memset(0xff, c, sizeof(*c)); free(c); } -- cgit v1.2.3