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:
Tobias Brunner
2026-04-02 08:17:05 +02:00
parent 513f25ce12
commit 20b07f2cbf
+5 -1
View File
@@ -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;