Skip to content

Avoid potential integer overflow spotted by UBSan

Daiki Ueno requested to merge wip/dueno/ci-fixes into master

There were a couple of places where signed integer is wrapped around when overflow, though unlike unsigned integer, it is undefined behavior: https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Integer-Overflow-Basics.html#Integer-Overflow-Basics

Spotted by UndefinedBehaviorSanitizer.

Merge request reports