diff --git a/src/libcharon/plugins/vici/vici_message.c b/src/libcharon/plugins/vici/vici_message.c index b0bd03eab..b982a5f4e 100644 --- a/src/libcharon/plugins/vici/vici_message.c +++ b/src/libcharon/plugins/vici/vici_message.c @@ -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;