* script-sections.cc (class Orphan_section_placement): Define
[binutils-gdb.git] / gold / attributes.cc
index 2024fda62966168e744d164ac1672e482c3f7cf0..b9b36089e3653ba9cf3c8d7b6c7e2f8095dae606 100644 (file)
@@ -278,7 +278,7 @@ Attributes_section_data::Attributes_section_data(
 
   const unsigned char *p = view;
   p = view;
-  if (*(p++) == 'A')
+  if (size > 0 && p != NULL && *(p++) == 'A')
     {
       size--;
       while (size > 0)