Patch: PR 4607: probe_binary() in windres fails for recognizing very small .res files
Kai Tietz
Kai.Tietz@onevision.com
Mon Jun 18 09:36:00 GMT 2007
Hi,
Suggested patch for PR4607. It is obvious (if seen) ;)
Within the function probe_binary () by using methodd read_res_data_hdr ()
- which increases the offset by BIN_RES_HDR_SIZE - the size of the header
is calcuted wrong. The offset BIN_RES_HDR_SIZE - which is part of the
returned "reshdr.header_size" - is taken into account twice. This can lead
to problems with res-files containing resource data with a size of less
than 8 bytes.
I changed the comment in my patch by quoting function and variable
references for better reading (as requested).
ChangeLog:
2007-06-11 Kai Tietz <kai.tietz@onevision.com>
* binutils/resres.c: (probe_binary): Do not
double count BIN_RES_HDR_SIZE offset.
Cheers,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer:
Ulrike Döhler, Manuela Kluger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: small_res.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20070618/cf18d374/attachment.txt>
More information about the Binutils
mailing list