libdwfl: Add overflow check while iterating in dwfl_segment_report_module
authorMark Wielaard <mark@klomp.org>
Wed, 8 Dec 2021 17:02:27 +0000 (18:02 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 16 Dec 2021 21:52:30 +0000 (22:52 +0100)
commit9098a37fcfb67342ad955efc71d1398e2f8a69c1
treed88765cab77d3e5900a08e8991197cdd93a0b4ad
parent3c9b69161b842708b4ef2f4e0f0b3ad1812798c2
libdwfl: Add overflow check while iterating in dwfl_segment_report_module

While iterating the notes we could overflow the len variable if the
note name or description was too big. Fix this by adding an (unsigned)
overflow check.

https://sourceware.org/bugzilla/show_bug.cgi?id=28654

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdwfl/ChangeLog
libdwfl/dwfl_segment_report_module.c