From 7297899a89d727fcf1894f4e0253f99d94bca9cb Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Tue, 30 Jun 2020 13:33:45 +0200 Subject: [PATCH] Make mbus_parse_variable_record forward error #169 Update mbus_parse_variable_record so it return NULL if mbus_parse_variable_record return NULL. This makes the program mbus_parse_hex exit with non zero exitcode. --- mbus/mbus-protocol-aux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index 5ddba9fb..82219b17 100755 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -1455,6 +1455,8 @@ mbus_data_variable_xml_normalized(mbus_data_variable *data) } else { + free(buff); + return NULL; } len += snprintf(&buff[len], buff_size - len, " \n\n");