[PATCH AUTOSEL 6.1 32/52] libperf evlist: Avoid out-of-bounds access