summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2019-10-08 10:48:25 +0900
committerJeff Epler <jepler@gmail.com>2019-10-08 11:16:11 +0900
commit85f0048d22a31f34d991e56757560f1b39c007b6 (patch)
treea732e253349a798aab8cfd2241dc27532abd95e0 /shared-module
parent46b6870ffac26fc360a00120a402535ed4ee836d (diff)
mp_bytecode_print_str: avoid undefined behavior
Left shift of negative numbers is undefined in the "C" standard. Multiplying by 128 has the intended effect (in the absence of integer overflow, anyway), can be implemented using the same shift instruction, but does not invoke undefined behavior. This problem was found using clang 7's scan-build static analyzer.
Diffstat (limited to 'shared-module')
0 files changed, 0 insertions, 0 deletions