Anonymous avatar Anonymous committed 2a525b1

Fix some build problems in p3_eperl.

Comments (0)

Files changed (2)

src/wml_backend/p3_eperl/eperl_main.c

 
 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)

src/wml_backend/p3_eperl/eperl_perl5.c

             IO_restore_stdout();
             IO_restore_stderr();
             if ((cpBuf = ePerl_ReadErrorFile(perlstderr, perlscript, source)) != NULL) {
-                fprintf(stderr, cpBuf);
+                fprintf(stderr, "%s", cpBuf);
             }
             CU(EX_FAIL);
         }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.