Changeset View
Changeset View
Standalone View
Standalone View
src/test/fuzz/scriptnum_ops.cpp
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | while (fuzzed_data_provider.remaining_bytes() > 0) { | ||||
} | } | ||||
script_num -= random_integer; | script_num -= random_integer; | ||||
break; | break; | ||||
} | } | ||||
case 11: | case 11: | ||||
script_num &= fuzzed_data_provider.ConsumeIntegral<int64_t>(); | script_num &= fuzzed_data_provider.ConsumeIntegral<int64_t>(); | ||||
break; | break; | ||||
} | } | ||||
(void)script_num.getint(); | |||||
// Avoid negation failure: | // Avoid negation failure: | ||||
// script/script.h:332:35: runtime error: negation of | // script/script.h:332:35: runtime error: negation of | ||||
// -9223372036854775808 cannot be represented in type 'int64_t' (aka | // -9223372036854775808 cannot be represented in type 'int64_t' (aka | ||||
// 'long'); cast to an unsigned type to negate this value to itself | // 'long'); cast to an unsigned type to negate this value to itself | ||||
if (script_num != CScriptNum{std::numeric_limits<int64_t>::min()}) { | if (script_num != CScriptNum{std::numeric_limits<int64_t>::min()}) { | ||||
(void)script_num.getvch(); | (void)script_num.getvch(); | ||||
} | } | ||||
} | } | ||||
} | } |