Ticket 787: Handle format-security compile error
authorAnders Henja <anders@baltrad.eu>
Wed, 14 Aug 2019 14:19:58 +0000 (16:19 +0200)
committerAnders Henja <anders@baltrad.eu>
Wed, 14 Aug 2019 14:19:58 +0000 (16:19 +0200)
ropo/fmi_image.c

index f1bafe9..29a2bcb 100644 (file)
@@ -970,7 +970,7 @@ void dump_comments(FILE *fp,char *comment,char *begin_code,char *end_code,int li
   l=0;
   for (i=0;i<=len;i++){
     if (l==0)
-      fprintf(fp,begin_code);
+      fprintf(fp, "%s", begin_code);
     c=comment[i];
     if (l==line_length-1){
       fprintf(fp,"%c\\%s",c,end_code);
@@ -978,7 +978,7 @@ void dump_comments(FILE *fp,char *comment,char *begin_code,char *end_code,int li
     else
       if ((c=='\n')||(i==len)){
        /*    if ((l==line_length-1)||(i==len-1)){ */
-       fprintf(fp,end_code);
+       fprintf(fp, "%s", end_code);
        l=0;}
       else {
        fputc(c,fp);