]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/readelf.c
asan: print_vms_time signed integer overflow
authorAlan Modra <amodra@gmail.com>
Thu, 24 Dec 2020 05:41:03 +0000 (16:11 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 24 Dec 2020 12:28:14 +0000 (22:58 +1030)
commitdccc31dee37b559219708c8d0accc7d512d51c1f
treed8a715ea7756951b41d671733c521e668622e51f
parentde34d42812a0b978b278cd344abeaee7c71fa55c
asan: print_vms_time signed integer overflow

I really don't think anyone cares about underflow of vms time values,
but the potential segfault on a gmtime failure is worth fixing.

* readelf.c (INT64_MIN): Define if not already defined.
(print_vms_time): Catch 64-bit overflow when converting from
vms time to posix time.  Don't segfault if gmtime returns NULL.
binutils/ChangeLog
binutils/readelf.c