flac_mac safe string patch from Janne Hyvärinen <cse@sci.fi>.

This commit is contained in:
Erik de Castro Lopo
2013-04-02 20:24:37 +11:00
parent 01e1bb9a58
commit 2b875d77aa

View File

@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
/* for the full 'from' and 'to' paths for the renamer process */
p = strrchr(argv[from_arg],'\\');
safe_strncat(from, p? p+1 : argv[from_arg], sizeof(from));
safe_strncpy(to, from, sizeof(to), sizeof(to));
safe_strncpy(to, from, sizeof(to));
cptr = strrchr(from,'.');
if(cptr == NULL)