[PATCH 5.19 049/192] perf: RISC-V: fix access beyond allocated array