aboutsummaryrefslogtreecommitdiff
path: root/binutils/resbin.c
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2021-04-14 11:53:30 +0100
committerNick Clifton <nickc@redhat.com>2021-04-14 11:55:16 +0100
commit6be872a439e15d12e86e7c5889f9e0b7804e59c6 (patch)
tree350e9e293e9af44e2c085f992c3d7fb79e3f0b70 /binutils/resbin.c
parentac4d323ea04501ad1c4eba77635b3f122c90ef85 (diff)
downloadgdb-6be872a439e15d12e86e7c5889f9e0b7804e59c6.zip
gdb-6be872a439e15d12e86e7c5889f9e0b7804e59c6.tar.gz
gdb-6be872a439e15d12e86e7c5889f9e0b7804e59c6.tar.bz2
Ignore trailing bytes at the end of a Windows Resource Version structure.
PR 27686 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the end of the structure.
Diffstat (limited to 'binutils/resbin.c')
-rw-r--r--binutils/resbin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils/resbin.c b/binutils/resbin.c
index b6f61f5..ba31077 100644
--- a/binutils/resbin.c
+++ b/binutils/resbin.c
@@ -967,6 +967,9 @@ bin_to_res_version (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type lengt
if (type != 0)
fatal (_("unexpected version type %d"), (int) type);
+ /* PR 27686: Ignore any padding bytes after the end of the version structure. */
+ length = verlen;
+
data += off;
length -= off;