mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-05 23:07:39 +00:00
'-f card.mfd' looked for card.mfd.bin and saved to card.mfd.bin, because the caller's suffix was appended unless the name already ended in that exact suffix. searchFile() now tries the name as typed before falling back to the suffixed one. newfilenamemcopyEx() keeps an extension that denotes the same kind of file it is about to write, and swaps any other for its own, so 'hf mf dump -f card.mfd' gives card.mfd + card.json rather than card.mfd + card.mfd.json. Both classify with get_filetype() so load and save cannot drift apart. Also drops the size_t underflow in newfilenamemcopyEx(), where a long path plus a configured save path made the snprintf bound wrap past the 1000 byte buffer. Co-Authored-By: Claude Opus 5 (1M context)