PR26415 UBSAN: vms-misc.c:636 left shift cannot be represented
authorAlan Modra <amodra@gmail.com>
Wed, 26 Aug 2020 01:56:35 +0000 (11:26 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 26 Aug 2020 13:53:44 +0000 (23:23 +0930)
commitb4e125d9351f84233698bef91530743547c87403
tree39a188813d5970328dcd00d0a141833bba0a4a0d
parenta68aba2da76e802faf2ea887a9d8ff16d3d5959f
PR26415 UBSAN: vms-misc.c:636 left shift cannot be represented

An unsigned short value is promoted to int, thus triggering UB on a
left shift of a positive value that results in a negative int.

PR 26415
* vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
bfd/ChangeLog
bfd/vms-misc.c