pts: Do not override status with SUCCESS if length is invalid

This commit is contained in:
Tobias Brunner
2014-12-23 15:40:01 +01:00
committed by Andreas Steffen
parent 919449a3f1
commit 027c19b097
+2 -1
View File
@@ -242,6 +242,8 @@ METHOD(pa_tnc_attr_t, process, status_t,
this->count--;
}
status = SUCCESS;
if (this->length != this->offset)
{
DBG1(DBG_TNC, "inconsistent length for %N/%N", pen_names, PEN_TCG,
@@ -249,7 +251,6 @@ METHOD(pa_tnc_attr_t, process, status_t,
*offset = this->offset;
status = FAILED;
}
status = SUCCESS;
end:
reader->destroy(reader);