Skip to content

Commit

Permalink
Corpus generation is more robust (capstone-engine#1419)
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber authored and aquynh committed Mar 11, 2019
1 parent 76550a7 commit f1618c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion suite/test_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def test_file(fname):
continue
hex_code = code.replace('0x', '')
hex_code = hex_code.replace(',', '')
hex_data = hex_code.decode('hex')
try:
hex_data = hex_code.strip().decode('hex')
except:
print "skipping", hex_code
fout = open("fuzz/corpus/%s_%s" % (os.path.basename(fname), hex_code), 'w')
if (arch, mode) not in mc_modes:
print "fail", arch, mode
Expand Down

0 comments on commit f1618c7

Please sign in to comment.