check for zero product vendor ID and non-zero product ID
This commit is contained in:
parent
7207793d57
commit
190d6fc37a
|
@ -144,6 +144,14 @@ METHOD(pa_tnc_attr_t, process, status_t,
|
|||
reader->read_data (reader, reader->remaining(reader), &product_name);
|
||||
reader->destroy(reader);
|
||||
|
||||
if (!this->product_vendor_id && this->product_id)
|
||||
{
|
||||
DBG1(DBG_TNC, "IETF product information vendor ID is 0 "
|
||||
"but product ID is not 0");
|
||||
*offset = 3;
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
this->product_name = malloc(product_name.len + 1);
|
||||
memcpy(this->product_name, product_name.ptr, product_name.len);
|
||||
this->product_name[product_name.len] = '\0';
|
||||
|
|
Loading…
Reference in New Issue