pe: be more careful when loading PE section list into memory
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Jun 2024 13:25:07 +0000 (15:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Jun 2024 15:09:44 +0000 (17:09 +0200)
commit4a479597218d40df1097ac882f5db9cc747d0f7f
treead81a0532e4e9e25f838febdf5d3cc878e4cf608
parent9573ab8f5a1e2dfdb3542aa647868ff73ced7dd2
pe: be more careful when loading PE section list into memory

Let's put a limit on how much memory we'll allocate for the section. And
let's add a safety overflow check.

(This is more a theoretic than a real problem, since on all PE archs
NumberOfSections is 16bit only.)
src/boot/efi/pe.c