File: 0001-Fix_CVE-2018-20365_for_real.patch

package info (click to toggle)
libraw 0.19.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,396 kB
  • sloc: cpp: 39,147; ansic: 23,363; perl: 145; makefile: 87; sh: 77
file content (51 lines) | stat: -rw-r--r-- 1,402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Alex Tutubalin <lexa@lexa.ru>
Date: Thu, 10 Jan 2019 21:46:09 +0100
Subject: Fix_CVE-2018-20365_for_real

---
 dcraw/dcraw.c             | 7 ++++++-
 internal/dcraw_common.cpp | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dcraw/dcraw.c b/dcraw/dcraw.c
index fc5539f..f6c3d06 100644
--- a/dcraw/dcraw.c
+++ b/dcraw/dcraw.c
@@ -20495,10 +20495,15 @@ void CLASS identify()
   {
     if (!load_raw)
       load_raw = &CLASS unpacked_load_raw;
-    if (is_raw > 1 && !shot_select && !half_size)
+    if (is_raw > 1 && !shot_select)
       filters = 0;
     maximum = 0x3fff;
   }
+  else if(load_raw == &LibRaw::sinar_4shot_load_raw)
+  {
+    if (is_raw > 1 && !shot_select)
+      filters = 0;
+  }
   else if (!strncmp(make, "Leaf", 4))
   {
     maximum = 0x3fff;
diff --git a/internal/dcraw_common.cpp b/internal/dcraw_common.cpp
index a0cd722..6d1376f 100644
--- a/internal/dcraw_common.cpp
+++ b/internal/dcraw_common.cpp
@@ -18997,10 +18997,15 @@ void CLASS identify()
   {
     if (!load_raw)
       load_raw = &CLASS unpacked_load_raw;
-    if (is_raw > 1 && !shot_select && !half_size)
+    if (is_raw > 1 && !shot_select)
       filters = 0;
     maximum = 0x3fff;
   }
+  else if(load_raw == &LibRaw::sinar_4shot_load_raw)
+  {
+    if (is_raw > 1 && !shot_select)
+      filters = 0;
+  }
   else if (!strncmp(make, "Leaf", 4))
   {
     maximum = 0x3fff;