File: 715777.patch

package info (click to toggle)
dcraw 9.28-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 9,084 kB
  • sloc: ansic: 51,198; sh: 35; makefile: 14
file content (14 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Bugfix #715777.
--- a/clean_crw.c
+++ b/clean_crw.c
@@ -37,6 +37,10 @@
   for (arg=1; arg < argc; arg++) {
     status = 1;
     fp = fopen (argv[arg], "rb");
+    if (!fp) {
+      fprintf(stderr, "Cannot open file!\n");
+      return 2;
+    }
     fseek (fp, 0, SEEK_END);
     size = ftell(fp);
     buffer = malloc (size + strlen(argv[arg]) + 10);