Skip to content

Commit

Permalink
Fixes #464 winepath path translation for .cur_input.
Browse files Browse the repository at this point in the history
  • Loading branch information
electricworry committed Jul 22, 2020
1 parent 4a51cb7 commit 024a88a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion afl-wine-trace
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 68,12 @@ else:
argv = sys.argv[1:]
for i in range(len(argv)):
if ".cur_input" in argv[i]:
argv[i] = subprocess.run([os.path.join(os.path.dirname(wine_path), "winepath"), "--windows", argv[i]], universal_newlines=True, stdout=subprocess.PIPE).stdout
# Get the Wine translated path using the winepath tool
arg_translated = subprocess.run([os.path.join(os.path.dirname(wine_path), "winepath"), "--windows", argv[i]], universal_newlines=True, stdout=subprocess.PIPE).stdout
# Remove the spurious LF at the end of the path
if len(arg_translated) > 0 and arg_translated[-1] == '\n':
arg_translated = arg_translated[:-1]
argv[i] = arg_translated
break

print("[afl-wine-trace] exec:", " ".join([qemu_path, wine_path] argv))
Expand Down

0 comments on commit 024a88a

Please sign in to comment.