Skip to content

Commit

Permalink
Fix crash opening X-Trans files generated using new firmware, fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
heckflosse committed Feb 11, 2016
1 parent 7d79df3 commit 6d7e2df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rtengine/dcraw.cc
Expand Up @@ -6682,7 +6682,7 @@ void CLASS parse_fuji (int offset)
} else if (tag == 0xc000) {
c = order;
order = 0x4949;
if ((tag = get4()) > 10000) tag = get4();
while ((tag = get4()) > 10000);
width = tag;
height = get4();
order = c;
Expand Down
13 changes: 11 additions & 2 deletions rtengine/dcraw.patch
@@ -1,5 +1,5 @@
--- dcraw.c 2015-09-08 08:08:11.000000000 +0200
+++ dcraw.cc 2016-01-08 15:37:02.884467080 +0100
--- dcraw.c 2016-02-11 22:56:58.043957200 +0100
+++ dcraw.cc 2016-02-11 23:13:28.708268000 +0100
@@ -1,3 +1,15 @@
+/*RT*/#include <glib.h>
+/*RT*/#include <glib/gstdio.h>
Expand Down Expand Up @@ -1348,6 +1348,15 @@
strcpy (make, "Phase One");
if (model[0]) return;
switch (raw_height) {
@@ -6658,7 +6682,7 @@
} else if (tag == 0xc000) {
c = order;
order = 0x4949;
- if ((tag = get4()) > 10000) tag = get4();
+ while ((tag = get4()) > 10000);
width = tag;
height = get4();
order = c;
@@ -6688,7 +6712,11 @@
order = get2();
hlen = get4();
Expand Down

0 comments on commit 6d7e2df

Please sign in to comment.