From: Serhei Makarov Date: Fri, 6 Mar 2026 17:21:47 +0000 (-0500) Subject: libebl/eblinitreg_sample.c: potential off-by-one fix X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=152b01c208c2b5e157e08ee09b2ee167c6dfc9d1;p=thirdparty%2Felfutils.git libebl/eblinitreg_sample.c: potential off-by-one fix {I believe the way things were setup on x86 meant this was never triggered, but it looks incorrect.} --- diff --git a/libebl/eblinitreg_sample.c b/libebl/eblinitreg_sample.c index 51fbe65d..1f89c17e 100644 --- a/libebl/eblinitreg_sample.c +++ b/libebl/eblinitreg_sample.c @@ -71,7 +71,7 @@ ebl_set_initial_registers_sample (Ebl *ebl, dwarf_regs[i] = 0x0; for (i = 0; i < n_regs; i++) { - if (i > n_regs_mapping) + if (i >= n_regs_mapping) /* TODO(REVIEW): off-by-one? */ break; if (regs_mapping[i] < 0 || regs_mapping[i] >= (int)ebl->frame_nregs) continue;