bugfix in VIFE parser

This commit is contained in:
Robert Johansson 2013-07-03 22:50:03 +09:00
parent 0a0403988c
commit 88b2b9fafa

View File

@ -2835,7 +2835,7 @@ mbus_data_variable_parse(mbus_frame *frame, mbus_data_variable *data)
{ {
unsigned char vife; unsigned char vife;
if (record->drh.vib.nvife < NITEMS(record->drh.vib.vife)) if (record->drh.vib.nvife > NITEMS(record->drh.vib.vife))
{ {
mbus_data_record_free(record); mbus_data_record_free(record);
snprintf(error_str, sizeof(error_str), "Too many VIFE."); snprintf(error_str, sizeof(error_str), "Too many VIFE.");