Re: [PATCH v2] libdw: check memory access in get_(u|s)leb128

2023-02-14 Thread Mark Wielaard
Hi Aleksei, On Mon, 2023-02-13 at 20:10 +, Aleksei Vetrov via Elfutils-devel wrote: > __libdw_get_uleb128 and __libdw_get_sleb128 should check if addrp has > already reached the end before unrolling the first step. It is done by > moving __libdw_max_len to the beginning of the function, which

[PATCH v2] libdw: check memory access in get_(u|s)leb128

2023-02-13 Thread Aleksei Vetrov via Elfutils-devel
From: Aleksei Vetrov __libdw_get_uleb128 and __libdw_get_sleb128 should check if addrp has already reached the end before unrolling the first step. It is done by moving __libdw_max_len to the beginning of the function, which can notice, that addrp is beyond the end. Then we just check the result