Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > e3bb0631cd90812d5642eb3b03f33a5d > files > 1

libmp3splt-0.7-1.mga1.src.rpm

diff -up ./src/oformat_parser.c.orig ./src/oformat_parser.c
--- ./src/oformat_parser.c.orig	2011-07-22 18:01:48.199225150 +0000
+++ ./src/oformat_parser.c	2011-07-22 18:10:38.549363621 +0000
@@ -501,7 +501,7 @@ put_value:
               int max_number_of_digits = splt_u_get_requested_num_of_digits(state,
                   state->oformat.format[i], &requested_num_of_digits, SPLT_FALSE);
 
-              snprintf(temp + offset, temp_len, format + 2);
+              snprintf(temp + offset, temp_len, "%s", format + 2);
 
               fm_length = strlen(temp) + 1 + max_number_of_digits;
               if ((fm = malloc(fm_length * sizeof(char))) == NULL)
@@ -538,7 +538,7 @@ put_value:
           //
           if (artist_or_performer != NULL)
           {
-            snprintf(temp+2,temp_len, state->oformat.format[i]+2);
+            snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2);
 
             int artist_length = 0;
             artist_length = strlen(artist_or_performer);
@@ -546,7 +546,7 @@ put_value:
           }
           else
           {
-            snprintf(temp,temp_len, state->oformat.format[i]+2);
+            snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
             fm_length = strlen(temp) + 1;
           }
 
@@ -563,7 +563,7 @@ put_value:
           }
           else
           {
-            snprintf(fm, fm_length, temp);
+            snprintf(fm, fm_length, "%s", temp);
           }
 
           break;
@@ -584,7 +584,7 @@ put_value:
           //
           if (artist != NULL)
           {
-            snprintf(temp+2,temp_len, state->oformat.format[i]+2);
+            snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2);
 
             int artist_length = 0;
             artist_length = strlen(artist);
@@ -592,7 +592,7 @@ put_value:
           }
           else
           {
-            snprintf(temp,temp_len, state->oformat.format[i]+2);
+            snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
             fm_length = strlen(temp) + 1;
           }
 
@@ -609,7 +609,7 @@ put_value:
           }
           else
           {
-            snprintf(fm, fm_length, temp);
+            snprintf(fm, fm_length, "%s", temp);
           }
           break;
         case 'b':
@@ -631,13 +631,13 @@ put_value:
           {
             int album_length = 0;
             album_length = strlen(album);
-            snprintf(temp+2, temp_len, state->oformat.format[i]+2);
+            snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
 
             fm_length = strlen(temp) + album_length + 1;
           }
           else
           {
-            snprintf(temp,temp_len, state->oformat.format[i]+2);
+            snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
             fm_length = strlen(temp) + 1;
           }
 
@@ -676,13 +676,13 @@ put_value:
           {
             int genre_length = 0;
             genre_length = strlen(genre);
-            snprintf(temp+2, temp_len, state->oformat.format[i]+2);
+            snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
 
             fm_length = strlen(temp) + genre_length + 1;
           }
           else
           {
-            snprintf(temp,temp_len, state->oformat.format[i]+2);
+            snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
             fm_length = strlen(temp) + 1;
           }
 
@@ -719,13 +719,13 @@ put_value:
           {
             int title_length = 0;
             title_length = strlen(title);
-            snprintf(temp+2, temp_len, state->oformat.format[i]+2);
+            snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
 
             fm_length = strlen(temp) + title_length + 1;
           }
           else
           {
-            snprintf(temp,temp_len, state->oformat.format[i]+2);
+            snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
             fm_length = strlen(temp) + 1;
           }
 
@@ -742,7 +742,7 @@ put_value:
           }
           else
           {
-            snprintf(fm, fm_length, temp);
+            snprintf(fm, fm_length, "%s", temp);
           }
           break;
         case 'p':
@@ -762,13 +762,13 @@ put_value:
           {
             int performer_length = 0;
             performer_length = strlen(performer);
-            snprintf(temp+2, temp_len, state->oformat.format[i]+2);
+            snprintf(temp+2, temp_len, "%s", state->oformat.format[i]+2);
 
             fm_length = strlen(temp) + performer_length + 1;
           }
           else
           {
-            snprintf(temp,temp_len, state->oformat.format[i]+2);
+            snprintf(temp,temp_len, "%s", state->oformat.format[i]+2);
             fm_length = strlen(temp) + 1;
           }
 
@@ -784,7 +784,7 @@ put_value:
           }
           else
           {
-            snprintf(fm, fm_length, temp);
+            snprintf(fm, fm_length, "%s", temp);
           }
           break;
         case 'l':
@@ -833,7 +833,7 @@ put_value:
           {
             const char *format = splt_u_get_format_ptr(state->oformat.format[i], temp);
 
-            snprintf(temp + 4, temp_len, format + 2);
+            snprintf(temp + 4, temp_len, "%s",format + 2);
             fm_length = strlen(temp) + 1 + max_num_of_digits;
           }
           else
@@ -864,7 +864,7 @@ put_value:
             original_filename = strdup(splt_su_get_fname_without_path(splt_t_get_filename_to_split(state)));
             if (original_filename)
             {
-              snprintf(temp+2,temp_len, state->oformat.format[i]+2);
+              snprintf(temp+2,temp_len, "%s", state->oformat.format[i]+2);
 
               splt_su_cut_extension(original_filename);