vici: Prevent uninitialized memory access if VICI_LIST_ITEM is too short
If there is only a single length byte, `value` is not changed and points to uninitialized data.
This commit is contained in:
@@ -183,7 +183,11 @@ METHOD(enumerator_t, parse_enumerate, bool,
|
||||
this->list = TRUE;
|
||||
break;
|
||||
case VICI_LIST_ITEM:
|
||||
this->reader->read_data16(this->reader, value);
|
||||
if (!this->reader->read_data16(this->reader, value))
|
||||
{
|
||||
DBG1(DBG_ENC, "invalid '%N' encoding", vici_type_names, type);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case VICI_LIST_END:
|
||||
this->list = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user