flac_mac safe string patch from Janne Hyvärinen <cse@sci.fi>.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 2 Apr 2013 09:24:37 +0000 (20:24 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 2 Apr 2013 09:24:37 +0000 (20:24 +1100)
src/monkeys_audio_utilities/flac_mac/main.c

index 8c8fa3d..8ffa5b6 100644 (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)