Skip to content

Commit 0f16742

Browse files
catenacyberaquynh
authored andcommittedMar 11, 2019
Corpus generation is more robust (capstone-engine#1419)
1 parent 119edad commit 0f16742

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎suite/test_corpus.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ def test_file(fname):
106106
continue
107107
hex_code = code.replace('0x', '')
108108
hex_code = hex_code.replace(',', '')
109-
hex_data = hex_code.decode('hex')
109+
try:
110+
hex_data = hex_code.strip().decode('hex')
111+
except:
112+
print "skipping", hex_code
110113
fout = open("fuzz/corpus/%s_%s" % (os.path.basename(fname), hex_code), 'w')
111114
if (arch, mode) not in mc_modes:
112115
print "fail", arch, mode

0 commit comments

Comments
 (0)
Please sign in to comment.