https://sourceware.org/bugzilla/show_bug.cgi?id=16923
Bug ID: 16923
Summary: Windres with version overflow clobbers version number
Product: binutils
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: lavr at ncbi dot nlm.nih.gov
Hello,
Below is an exceprt from rcparse.y (used by the windres utility)/
The parsing as coded results that a version given as, for example,
"a,b,c,-1" (i.e. with an overflow) propagates into adjacent fields,
so the above version is actually recorded as "a.b.65535.65535".
Is that a bug or the expected behavior?
Shouldn't $4 and $6 be masked out with 0xFFFF before ORing?
| fixedverinfo FILEVERSION numexpr optcnumexpr optcnumexpr
optcnumexpr
{
$1->file_version_ms = ($3 << 16) | $4;
$1->file_version_ls = ($5 << 16) | $6;
$$ = $1;
}
| fixedverinfo PRODUCTVERSION numexpr optcnumexpr optcnumexpr
optcnumexpr
{
$1->product_version_ms = ($3 << 16) | $4;
$1->product_version_ls = ($5 << 16) | $6;
$$ = $1;
}
Thanks,
Anton Lavrentiev
Contractor NIH/NLM/NCBI
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils