SIGN IN SIGN UP

fix: Iterate the internal plugin table by length instead of a phantom sentinel

The PLUGIN_TYPE_OLD_INTERNAL branch of eth_plugin_call() walked
INTERNAL_ETH_PLUGINS with an open-ended `for (i = 0;; i++)` loop and
broke out when `alias[0] == 0`. The array initializer never emits a
zero-byte sentinel — its last entry is "-eip7251" — so the only way
the break could fire was the loop reading past the end of the array
into adjacent .rodata and happening to land on a zero byte. Any
non-zero byte in that adjacent memory turns the loop into an out-of-
bounds dereference and an attempt to call PIC() on garbage.

Bound the loop by ARRAYLEN(INTERNAL_ETH_PLUGINS) so iteration stays
inside the table regardless of how its initializer is extended.

(cherry picked from commit 6630315dac7736bfcfeaaaca85ce0e3b4b105432)
C
Charles-Edouard de la Vergne committed
a6326023221e7b075d0a6655b43944828420ed82
Parent: dc00436
Committed by Alexandre Paillier <alexandre.paillier@ledger.fr> on 8/25/2026, 3:04:00 PM