1 diff -urN libmp3splt-0.9.0.orig/src/oformat_parser.c libmp3splt-0.9.0/src/oformat_parser.c
2 --- libmp3splt-0.9.0.orig/src/oformat_parser.c 2014-03-22 23:25:22.076480090 +0100
3 +++ libmp3splt-0.9.0/src/oformat_parser.c 2014-03-22 23:30:02.099814984 +0100
5 int max_number_of_digits = splt_u_get_requested_num_of_digits(state,
6 state->oformat.format[i], &requested_num_of_digits, SPLT_FALSE);
8 - snprintf(temp + offset, temp_len, format);
9 + snprintf(temp + offset, temp_len, "%s", format);
11 fm_length = strlen(temp) + 1 + max_number_of_digits;
12 if ((fm = malloc(fm_length * sizeof(char))) == NULL)
15 if (artist_or_performer != NULL)
17 - snprintf(temp+2,temp_len, state->oformat.format[i]+2);
18 + snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2);
20 int artist_length = 0;
21 artist_length = strlen(artist_or_performer);
26 - snprintf(temp,temp_len, state->oformat.format[i]+2);
27 + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
28 fm_length = strlen(temp) + 1;
35 - snprintf(fm, fm_length, temp);
36 + snprintf(fm, fm_length, "%s", temp);
44 - snprintf(temp+2,temp_len, state->oformat.format[i]+2);
45 + snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2);
47 int artist_length = 0;
48 artist_length = strlen(artist);
53 - snprintf(temp,temp_len, state->oformat.format[i]+2);
54 + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
55 fm_length = strlen(temp) + 1;
62 - snprintf(fm, fm_length, temp);
63 + snprintf(fm, fm_length, "%s", temp);
70 album_length = strlen(album);
71 - snprintf(temp+2, temp_len, state->oformat.format[i]+2);
72 + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
74 fm_length = strlen(temp) + album_length + 1;
78 - snprintf(temp,temp_len, state->oformat.format[i]+2);
79 + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
80 fm_length = strlen(temp) + 1;
86 genre_length = strlen(genre);
87 - snprintf(temp+2, temp_len, state->oformat.format[i]+2);
88 + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
90 fm_length = strlen(temp) + genre_length + 1;
94 - snprintf(temp,temp_len, state->oformat.format[i]+2);
95 + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
96 fm_length = strlen(temp) + 1;
101 int title_length = 0;
102 title_length = strlen(title);
103 - snprintf(temp+2, temp_len, state->oformat.format[i]+2);
104 + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
106 fm_length = strlen(temp) + title_length + 1;
110 - snprintf(temp,temp_len, state->oformat.format[i]+2);
111 + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
112 fm_length = strlen(temp) + 1;
119 - snprintf(fm, fm_length, temp);
120 + snprintf(fm, fm_length, "%s", temp);
124 @@ -786,13 +786,13 @@
126 int performer_length = 0;
127 performer_length = strlen(performer);
128 - snprintf(temp+2, temp_len, state->oformat.format[i]+2);
129 + snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
131 fm_length = strlen(temp) + performer_length + 1;
135 - snprintf(temp,temp_len, state->oformat.format[i]+2);
136 + snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
137 fm_length = strlen(temp) + 1;
144 - snprintf(fm, fm_length, temp);
145 + snprintf(fm, fm_length, "%s", temp);
151 splt_u_get_format_ptr(state->oformat.format[i], temp, NULL);
153 - snprintf(temp + 4, temp_len, format + 2);
154 + snprintf(temp + 4, temp_len, "%s", format + 2);
155 fm_length = strlen(temp) + 1 + max_num_of_digits;
159 original_filename = strdup(splt_su_get_fname_without_path(splt_t_get_filename_to_split(state)));
160 if (original_filename)
162 - snprintf(temp+2,temp_len, state->oformat.format[i]+2);
163 + snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2);
165 splt_su_cut_extension(original_filename);