From f203f284d6e15de4a2a12f8788d6e09eb6287334 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 9 Jan 2017 16:19:19 +0100 Subject: [PATCH 1/3] Limited exif user comment to 65535 chars --- rtexif/stdattribs.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 38e7f4b25..ed8f97819 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -447,12 +447,12 @@ public: { int count = t->getCount(); if(count <= 8) { - return ""; + return std::string(); } - + count = std::min(count, 65535); // limit to 65535 chars to avoid crashes in case of corrupted metadata char *buffer = new char[count - 7]; - if (!strncmp((char*)t->getValue(), "ASCII\0\0\0", 8)) { // TODO: this compares only up to the first \0, remaining \0\0 are ignored + if (!memcmp((char*)t->getValue(), "ASCII\0\0\0", 8)) { strncpy (buffer, (char*)t->getValue() + 8, count - 8); buffer[count - 8] = '\0'; } else { From cef9b7fe2b35730314f0b066086f63ea4c171df7 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 10 Jan 2017 22:20:23 +0100 Subject: [PATCH 2/3] Pentax K1 file in APS-C mode has wrong raw crop, fixes #3519 --- rtengine/camconst.json | 2 +- rtengine/dcraw.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 7ddcefaba..5d0898ee9 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1784,7 +1784,7 @@ Camera constants: "make_model": [ "RICOH PENTAX K-1", "PENTAX K-1" ], "dcraw_matrix": [ 8596,-2981,-639,-4202,12046,2431,-685,1424,6122 ], // adobe DNG v9.7 D65 //"dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG - "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 + //"raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 "ranges": { "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 4daf451d0..4a5e7f1c8 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -8743,6 +8743,10 @@ void CLASS identify() if (width == 7424 && !strcmp(model,"645D")) { height = 5502; width = 7328; filters = 0x61616161; top_margin = 29; left_margin = 48; } + if (width == 7392 && !strncmp(model,"K-1",3)) + { left_margin = 6; width = 7376; if(!dng_version) {top_margin = 18; height -= top_margin; }} + if (width == 4832 && !strncmp(model,"K-1",3)) // K-1 APS-C format + if(!dng_version) {top_margin = 18; height -= top_margin; } if (height == 3014 && width == 4096) /* Ricoh GX200 */ width = 4014; if (dng_version) { From 7a98d1c6130950ab444151f796829231023294d2 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 11 Jan 2017 16:48:31 +0100 Subject: [PATCH 3/3] Build on Linux broken due DCP profile filename typo, fixes #3603 --- .../{SONY ILCE-6000.dcp => Sony ILCE-6000.dcp} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename rtdata/dcpprofiles/{SONY ILCE-6000.dcp => Sony ILCE-6000.dcp} (100%) diff --git a/rtdata/dcpprofiles/SONY ILCE-6000.dcp b/rtdata/dcpprofiles/Sony ILCE-6000.dcp similarity index 100% rename from rtdata/dcpprofiles/SONY ILCE-6000.dcp rename to rtdata/dcpprofiles/Sony ILCE-6000.dcp