mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 19:46:09 +08:00
Fix static analysis warning about undefined bheaviour.
PR binutils/19310 * dwarf.c (display_debug_frames): Recode range test to avoid undefined behaviour.
This commit is contained in:
@ -6459,7 +6459,7 @@ display_debug_frames (struct dwarf_section *section,
|
||||
|
||||
case DW_CFA_def_cfa_expression:
|
||||
ul = LEB ();
|
||||
if (start >= block_end || start + ul > block_end || start + ul < start)
|
||||
if (start >= block_end || ul > (unsigned long) (block_end - start))
|
||||
{
|
||||
printf (_(" DW_CFA_def_cfa_expression: <corrupt len %lu>\n"), ul);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user