Skip to content

Commit

Permalink
Make mbus_parse_variable_record forward error rscada#169
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fredrik-sk committed Jun 30, 2020
1 parent 17a7328 commit 7297899
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mbus/mbus-protocol-aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, " </DataRecord>\n\n");
Expand Down

0 comments on commit 7297899

Please sign in to comment.