diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-10-09 20:07:51 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-10-09 23:58:35 +0200 |
commit | 190d6fc37aeffbb3ce391cd1a04022ecde9e81f0 (patch) | |
tree | bde54bb903bcb0f3cfaea61dec6a484510f014d9 /src/libimcv | |
parent | 7207793d578c5abd0ec8c6f1808f16be6dc95d33 (diff) | |
download | strongswan-190d6fc37aeffbb3ce391cd1a04022ecde9e81f0.tar.bz2 strongswan-190d6fc37aeffbb3ce391cd1a04022ecde9e81f0.tar.xz |
check for zero product vendor ID and non-zero product ID
Diffstat (limited to 'src/libimcv')
-rw-r--r-- | src/libimcv/ietf/ietf_attr_product_info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libimcv/ietf/ietf_attr_product_info.c b/src/libimcv/ietf/ietf_attr_product_info.c index dcc0e0294..91bea8181 100644 --- a/src/libimcv/ietf/ietf_attr_product_info.c +++ b/src/libimcv/ietf/ietf_attr_product_info.c @@ -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'; |