[PATCH 6.1 47/83] libperf evlist: Avoid out-of-bounds access