pts: Do not override status with SUCCESS if length is invalid
authorTobias Brunner <tobias@strongswan.org>
Mon, 15 Dec 2014 17:18:40 +0000 (18:18 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 23 Dec 2014 14:40:01 +0000 (15:40 +0100)
src/libimcv/tcg/pts/tcg_pts_attr_file_meas.c

index 5b4cc27..3978829 100644 (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);