[PATCH AUTOSEL 5.15 22/34] libperf evlist: Avoid out-of-bounds access