diff options
author | Dmitry Timoshkov <dmitry@baikal.ru> | 2017-01-18 11:40:06 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-01-18 11:40:06 +0000 |
commit | 6bb21700abb61cdb62a3d9fdf417971d528d5a37 (patch) | |
tree | 877efcd7aa8ff71c3976e74feae495792f43a55f /binutils/resbin.c | |
parent | 01fabda4d46b34b2b02fb5a447943ab281c8ac8c (diff) | |
download | gdb-6bb21700abb61cdb62a3d9fdf417971d528d5a37.zip gdb-6bb21700abb61cdb62a3d9fdf417971d528d5a37.tar.gz gdb-6bb21700abb61cdb62a3d9fdf417971d528d5a37.tar.bz2 |
Stop the (optional) dialong control data from being aligned when parsing/writing windows resource files.
binutils* resbin.c: Optional dialog control data immediately follow
the control description without alignment.
* testsuite/binutils-all/windres/controldata.rc: New test.
source.
* testsuite/binutils-all/windres/controldata.rsd: New test.
Diffstat (limited to 'binutils/resbin.c')
-rw-r--r-- | binutils/resbin.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/binutils/resbin.c b/binutils/resbin.c index f836a5a..07bce49 100644 --- a/binutils/resbin.c +++ b/binutils/resbin.c @@ -574,8 +574,6 @@ bin_to_res_dialog (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length dc->data = NULL; else { - off = (off + 3) &~ 3; - if (length < off + datalen) toosmall (_("dialog control data")); @@ -1582,7 +1580,6 @@ res_to_bin_dialog (windres_bfd *wrbfd, rc_uint_type off, const rc_dialog *dialog { rc_uint_type saved_off = off; rc_uint_type old_off; - off += (4 - ((off - off_delta) & 3)) & 3; old_off = off; off = res_to_bin_rcdata (wrbfd, off, dc->data); @@ -1590,10 +1587,10 @@ res_to_bin_dialog (windres_bfd *wrbfd, rc_uint_type off, const rc_dialog *dialog old_off = off = saved_off; if (wrbfd) windres_put_16 (wrbfd, dc_rclen, off - old_off); - } + } if (wrbfd) set_windres_bfd_content (wrbfd, dc_rclen, marker, 2); - } + } if (wrbfd) { |