BF: Re-write/clean up code which generates names for target masks.
The logic used to extract file basenames for each target mask specified via the --targetmasks
option was flawed, and could result in a pointer underflow (i.e. tmpname[pos] = '_';
, where pos == -1
).
This loop (replacing all /
with _
characters in the target file paths) wasn't even used anyway, as the next step in the logic would discard everything after the last _
.
Edited by Paul McCarthy