fixed range check in parse_record_placement (32Bit/64Bit issue) #58968
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 17 Aug 2020 09:52:47 +0000 (11:52 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 17 Aug 2020 11:55:34 +0000 (13:55 +0200)
commitb296fba9a10d7a3e8ff1bbcac26b449e8bc31983
treeea0065c02622c1998e0a37b394de6c62cf2d0c9a
parent5945ce59bf14d8e5ffa50ef82ce56e79800a9bb2
fixed range check in parse_record_placement (32Bit/64Bit issue) #58968

The regression failed for test "lexer crash due to overflow" (403)
on i386 architecture. The reason is that long is 64Bit on amd64 while
it is 32Bit on i386. The code used long as type that can hold larger
values than int which does not work on 32Bit systems.

The change keeps the value as double as long as the range checks are done.

see: https://savannah.gnu.org/bugs/?58968
src/language/data-io/placement-parser.c