diff --git a/src/libpts/pts/pts_ima_event_list.c b/src/libpts/pts/pts_ima_event_list.c index a237451ca..9959fb3b3 100644 --- a/src/libpts/pts/pts_ima_event_list.c +++ b/src/libpts/pts/pts_ima_event_list.c @@ -252,7 +252,7 @@ pts_ima_event_list_t* pts_ima_event_list_create(char *file) } /* extract the hash algorithm name */ - pos = strchr(algo_digest, '\0'); + pos = memchr(algo_digest, '\0', algo_digest_len); if (!pos) { error = "no algo field";