diff options
author | Mark Harmstone <mark@harmstone.com> | 2024-07-29 22:19:36 +0100 |
---|---|---|
committer | Mark Harmstone <mark@harmstone.com> | 2024-08-01 01:33:34 +0100 |
commit | e859b93a8cfbe506f8cce1398dd585bab07499fe (patch) | |
tree | b9204330e83f1b92f918d18c2e0fa80f544fcb17 /ld/pdb.c | |
parent | c2e15bf51978bb020c2e4e142f60896a29e05617 (diff) | |
download | binutils-e859b93a8cfbe506f8cce1398dd585bab07499fe.zip binutils-e859b93a8cfbe506f8cce1398dd585bab07499fe.tar.gz binutils-e859b93a8cfbe506f8cce1398dd585bab07499fe.tar.bz2 |
ld/PDB: handle empty LF_FIELDLIST types
Empty structs in C++ lead to empty LF_FIELDLIST types in the .debug$T
section, but we were mistakenly rejecting these as invalid. Allow
CodeView types of two bytes, and add a test for this.
Diffstat (limited to 'ld/pdb.c')
-rw-r--r-- | ld/pdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3582,7 +3582,7 @@ handle_debugt_section (asection *s, bfd *mod, struct types *types, size = bfd_getl16 (data + off); off += sizeof (uint16_t); - if (size + off > s->size || size <= sizeof (uint16_t)) + if (size + off > s->size || size < sizeof (uint16_t)) { free (data); bfd_set_error (bfd_error_bad_value); |