mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
Prevent large (or negative) version values from overflowing into other fields when
parsing version strings. PR binutils/16923 * rcparse.y (fixedverinfo): Prevent large version numbers from corrupting other values.
This commit is contained in:
parent
0fc0599720
commit
548a235728
@ -1,3 +1,9 @@
|
||||
2014-06-17 Anton Lavrentiwev <lavr@ncbi.nim.nih.gov>
|
||||
|
||||
PR binutils/16923
|
||||
* rcparse.y (fixedverinfo): Prevent large version numbers from
|
||||
corrupting other values.
|
||||
|
||||
2014-06-09 Romain Chastenet <romain.chastenet@free.fr>
|
||||
|
||||
PR binutils/16252
|
||||
|
@ -1425,15 +1425,15 @@ fixedverinfo:
|
||||
| fixedverinfo FILEVERSION numexpr optcnumexpr optcnumexpr
|
||||
optcnumexpr
|
||||
{
|
||||
$1->file_version_ms = ($3 << 16) | $4;
|
||||
$1->file_version_ls = ($5 << 16) | $6;
|
||||
$1->file_version_ms = ($3 << 16) | ($4 & 0xffff);
|
||||
$1->file_version_ls = ($5 << 16) | ($6 & 0xffff);
|
||||
$$ = $1;
|
||||
}
|
||||
| fixedverinfo PRODUCTVERSION numexpr optcnumexpr optcnumexpr
|
||||
optcnumexpr
|
||||
{
|
||||
$1->product_version_ms = ($3 << 16) | $4;
|
||||
$1->product_version_ls = ($5 << 16) | $6;
|
||||
$1->product_version_ms = ($3 << 16) | ($4 & 0xffff);
|
||||
$1->product_version_ls = ($5 << 16) | ($6 & 0xffff);
|
||||
$$ = $1;
|
||||
}
|
||||
| fixedverinfo FILEFLAGSMASK numexpr
|
||||
|
Loading…
Reference in New Issue
Block a user