testdisk icon indicating copy to clipboard operation
testdisk copied to clipboard

Add `/sigfile <path>` parameter to specify custom signature file location.

Open piotrkochan opened this issue 3 months ago • 2 comments

Adds /sigfile <path> parameter to specify custom signature file location.

  • Maintains backward compatibility
  • Falls back to default behavior if custom file unavailable
  • Updated help text

Usage: photorec /sigfile custom.sig [options] [device]

piotrkochan avatar Sep 27 '25 13:09 piotrkochan

I probably should move static char *custom_sig_file = NULL; to struct ph_param. What do you think, @cgsecurity?

piotrkochan avatar Sep 27 '25 14:09 piotrkochan

I probably should move static char *custom_sig_file = NULL; to struct ph_param. What do you think, @cgsecurity?

As it's only used once, I think it's OK as a "static char*".

As the function set_custom_signature_file() is defined in file_sig.c and not filegen.c, it may be better to define its prototype in a new file file_sig.h instead of filegen.h.

cgsecurity avatar Sep 28 '25 12:09 cgsecurity