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

This commit is contained in:
Tobias Brunner 2014-12-15 18:18:40 +01:00 committed by Andreas Steffen
parent 919449a3f1
commit 027c19b097
1 changed files with 2 additions and 1 deletions

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);