perfcount: Fix CID 1035493 Out-of-bounds read