Skip to content

Commit

Permalink
Merge pull request #310 from avast-tl/bug-cleanup-in-raw-mode-removes…
Browse files Browse the repository at this point in the history
…-input-file

Do not remove the input file when --cleanup is used together with --mode raw (#309)
  • Loading branch information
PeterMatula authored May 28, 2018
2 parents 87051ae + b94efd2 commit 5563a3b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions scripts/retdec-decompiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ cleanup()
fi
rm -f "$OUT_BACKEND_BC"
rm -f "$OUT_BACKEND_LL"
rm -f "$OUT_RAW_EXECUTABLE" # Mode "raw"
rm -f "$OUT_RESTORED" # Archive support
rm -f "$OUT_ARCHIVE" # Archive support (Macho-O Universal)
rm -f "${SIGNATURES_TO_REMOVE[@]}" # Signatures generated from archives
Expand Down Expand Up @@ -797,14 +796,9 @@ fi

# Raw.
if [ "$MODE" = "raw" ]; then
# Default values and initialization.
OUT_RAW_EXECUTABLE="$IN"

# Entry point for THUMB must be odd.
[ "$ARCH" = "thumb" ] && [ $((RAW_ENTRY_POINT % 2)) -eq 0 ] && RAW_ENTRY_POINT=$((RAW_ENTRY_POINT+1))

# Enable binary decompilation.
IN="$OUT_RAW_EXECUTABLE"
KEEP_UNREACHABLE_FUNCS=1
fi

Expand Down

0 comments on commit 5563a3b

Please sign in to comment.