This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Attribute with DW_FORM_flag_present


DWARF4 attributes with DW_FORM_flag_present don't read any data,
and thus shouldn't be checking the data pointer.
    
    	PR 19850
    	* dwarf2.c (read_attribute_value): Skip info_ptr check for
    	DW_FORM_flag_present.

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 4d6f8fc..addfbf5 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1003,7 +1003,7 @@ read_attribute_value (struct attribute *  attr,
   struct dwarf_block *blk;
   bfd_size_type amt;
 
-  if (info_ptr >= info_ptr_end)
+  if (info_ptr >= info_ptr_end && form != DW_FORM_flag_present)
     {
       (*_bfd_error_handler) (_("Dwarf Error: Info pointer extends beyond end of attributes"));
       bfd_set_error (bfd_error_bad_value);

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]