1. Shlomi Fish
  2. Website Meta Language

Commits

shl...@7081e830-ea04-0410-ae62-fb6148e2d9db  committed 2a525b1

Fix some build problems in p3_eperl.

  • Participants
  • Parent commits 75586ed
  • Branches conversion-to-cmake

Comments (0)

Files changed (2)

File src/wml_backend/p3_eperl/eperl_main.c

View file
 
 void give_readme(void)
 {
-    fprintf(stdout, ePerl_README);
+    fprintf(stdout, "%s", ePerl_README);
 }
 
 void give_license(void)
 {
-    fprintf(stdout, ePerl_LICENSE);
+    fprintf(stdout, "%s", ePerl_LICENSE);
 }
 
 void give_img_logo(void)
     if (mode == MODE_NPHCGI)
         HTTP_PrintResponseHeaders("");
     printf("Content-Type: image/gif\r\n\r\n");
-    fwrite(ePerl_LOGO_data, ePerl_LOGO_size, 1, stdout);
+    if (fwrite(ePerl_LOGO_data, ePerl_LOGO_size, 1, stdout) != 1)
+    {
+        fprintf (stderr, "%s\n", "Cannot print the logo.");
+        return;
+    }
 }
 
 void give_img_powered(void)

File src/wml_backend/p3_eperl/eperl_perl5.c

View file
             IO_restore_stdout();
             IO_restore_stderr();
             if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) {
-                fprintf(stderr, cpBuf);
+                fprintf(stderr, "%s", cpBuf);
             }
             CU(EX_FAIL);
         }