diff options
author | Ian Lance Taylor <ian@airs.com> | 2010-02-23 17:45:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2010-02-23 17:45:38 +0000 |
commit | ca419a6f33e27d59324ba74c4655e551a381aad5 (patch) | |
tree | 71a934c1494b76fcad34218c010af2a09d755396 /gold/attributes.cc | |
parent | 135b9c78b2e0da945e37dcd9e1206c6715854d44 (diff) | |
download | gdb-ca419a6f33e27d59324ba74c4655e551a381aad5.zip gdb-ca419a6f33e27d59324ba74c4655e551a381aad5.tar.gz gdb-ca419a6f33e27d59324ba74c4655e551a381aad5.tar.bz2 |
* arm.cc (Target_arm::do_finalize_sections): Create attribute
section if it does not already exist.
* attributes.cc (Attributes_section_data::Attributes_section_data):
Don't crash if size is zero.
Diffstat (limited to 'gold/attributes.cc')
-rw-r--r-- | gold/attributes.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gold/attributes.cc b/gold/attributes.cc index 2024fda..b9b3608 100644 --- a/gold/attributes.cc +++ b/gold/attributes.cc @@ -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) |