From: Sansar Choinyambuu Date: Mon, 24 Oct 2011 12:11:11 +0000 (+0200) Subject: Copy just 20 bytes of pcr after value X-Git-Tag: 4.6.2~299 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbe7751a2252ffdaf74521585c8533bf7eba8bfa;p=thirdparty%2Fstrongswan.git Copy just 20 bytes of pcr after value --- diff --git a/src/libimcv/plugins/imv_attestation/imv_attestation_process.c b/src/libimcv/plugins/imv_attestation/imv_attestation_process.c index a097aba6da..569033a577 100644 --- a/src/libimcv/plugins/imv_attestation/imv_attestation_process.c +++ b/src/libimcv/plugins/imv_attestation/imv_attestation_process.c @@ -264,7 +264,7 @@ bool imv_attestation_process(pa_tnc_attr_t *attr, linked_list_t *attr_list, entry = malloc_thing(pcr_entry_t); entry->pcr_number = extended_pcr; - strcpy(entry->pcr_value, pcr_after.ptr); + strncpy(entry->pcr_value, pcr_after.ptr, PCR_LEN); pts->add_pcr_entry(pts, entry); }