comparison contrib/fuzz/mpatch_corpus.py @ 38303:1fb2510cf8c8

bitmanipulation: fix undefined behavior in bit shift in getbe32 OSS-Fuzz caught this in its ubsan mode[0]. I'm not worried about a security issue here because in practice this should work out the way we naively expected, we're just making things explicit to the compiler with the casts. 0: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8876 Differential Revision: https://phab.mercurial-scm.org/D3729
author Augie Fackler <augie@google.com>
date Wed, 13 Jun 2018 10:24:44 -0400
parents 99ab72b867b7
children 2372284d9457
comparison
equal deleted inserted replaced
38300:74b4a54002ec 38303:1fb2510cf8c8
76 print('skipping seed file from repo data') 76 print('skipping seed file from repo data')
77 # Automatically discovered by running the fuzzer 77 # Automatically discovered by running the fuzzer
78 zf.writestr( 78 zf.writestr(
79 "mpatch_decode_old_overread", "\x02\x00\x00\x00\x02\x00\x00\x00" 79 "mpatch_decode_old_overread", "\x02\x00\x00\x00\x02\x00\x00\x00"
80 ) 80 )
81 # https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8876
82 zf.writestr(
83 "mpatch_ossfuzz_getbe32_ubsan",
84 "\x02\x00\x00\x00\x0c \xff\xff\xff\xff ")
81 zf.writestr( 85 zf.writestr(
82 "mpatch_apply_over_memcpy", 86 "mpatch_apply_over_memcpy",
83 '\x13\x01\x00\x05\xd0\x00\x00\x00\x00\x00\x00\x00\x00\n \x00\x00\x00' 87 '\x13\x01\x00\x05\xd0\x00\x00\x00\x00\x00\x00\x00\x00\n \x00\x00\x00'
84 '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 88 '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
85 '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00' 89 '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00'