pts: Don't rely on BIOS event buffer to be null terminated
authorTobias Brunner <tobias@strongswan.org>
Tue, 16 Feb 2021 14:15:38 +0000 (15:15 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 16 Feb 2021 14:16:25 +0000 (15:16 +0100)
src/libimcv/pts/pts_ima_bios_list.c

index 2c798cf..27287af 100644 (file)
@@ -297,7 +297,7 @@ pts_ima_bios_list_t* pts_ima_bios_list_create(tpm_tss_t *tpm, char *file,
                        case EV_S_CRTM_CONTENTS:
                        case EV_IPL:
                                if (event_type == EV_NO_ACTION && event_len == 17 &&
-                                       streq(event_buf, "StartupLocality"))
+                                       strpfx(event_buf, "StartupLocality"))
                                {
                                        DBG2(DBG_PTS, "        'StartupLocality' %x", event_buf[16]);
                                }