[PATCH AUTOSEL 5.10 20/31] libperf evlist: Avoid out-of-bounds access