From dbd69e49f598d3483885afe1a2f1b7f06d1a0dc1 Mon Sep 17 00:00:00 2001 From: Robert Johansson Date: Sun, 12 Aug 2012 19:08:14 +0900 Subject: [PATCH] make sure that records are initialized to avoid potential core dumps after incomplete parsning and repacking --- mbus/mbus-protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mbus/mbus-protocol.c b/mbus/mbus-protocol.c index ffbb059..7affabc 100755 --- a/mbus/mbus-protocol.c +++ b/mbus/mbus-protocol.c @@ -3706,6 +3706,8 @@ mbus_data_record_new() return NULL; } + memset(record, 0, sizeof(mbus_data_record)); + record->next = NULL; return record; }