Fix bug when requesting a nonexistant frame from Fuji RAF

This commit is contained in:
heckflosse
2016-11-01 16:33:59 +01:00
parent 405e9a29a2
commit aca3b5aa82
2 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
--- dcraw.c 2016-10-28 13:45:27 +0000
+++ dcraw.cc 2016-10-31 13:35:15 +0000
--- dcraw.c 2016-11-01 01:07:55 +0000
+++ dcraw.cc 2016-11-01 14:54:02 +0000
@@ -1,3 +1,16 @@
+/*RT*/#include <glib.h>
+/*RT*/#include <glib/gstdio.h>
@@ -2892,8 +2892,12 @@
parse_ciff (hlen, flen-hlen, 0);
load_raw = &CLASS canon_load_raw;
} else if (parse_tiff(0)) apply_tiff();
@@ -8494,6 +8575,7 @@
fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
@@ -8491,9 +8572,10 @@
parse_fuji (i);
}
load_raw = &CLASS unpacked_load_raw;
- fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
+ fseek (ifp, 100+28*(shot_select > 0 && shot_select < is_raw), SEEK_SET);
parse_tiff (data_offset = get4());
parse_tiff (thumb_offset+12);
+/*RT*/ exif_base = thumb_offset+12;