Re: [PATCH v2 1/3] riscv: module: Fix out-of-bounds relocation access

From: Maxim Kochetkov
Date: Wed Apr 09 2025 - 15:22:06 EST


09.04.2025 20:14, Samuel Holland пишет:
The current code allows rel[j] to access one element past the end of the
relocation section. Simplify to num_relocations which is equivalent to
the existing size expression.

Fixes: 080c4324fa5e ("riscv: optimize ELF relocation function in riscv")
Signed-off-by: Samuel Holland <samuel.holland@xxxxxxxxxx>

Reviewed-by: Maxim Kochetkov <fido_max@xxxxxxxx>