Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libraw for openSUSE:Factory checked 
in at 2026-11-27 19:40:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libraw (Old)
 and      /work/SRC/openSUSE:Factory/.libraw.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libraw"

Fri Nov 27 19:40:39 2026 rev:73 rq:1400547 version:0.22.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libraw/libraw.changes    2026-09-30 
16:22:58.834170794 +0200
+++ /work/SRC/openSUSE:Factory/.libraw.new.1340718/libraw.changes       
2026-11-27 19:41:31.485022347 +0100
@@ -1,0 +2,45 @@
+Wed Nov 25 09:36:22 UTC 2026 - Petr Gajdos <[email protected]>
+
+- version update to 0.22.3
+  * destimage var added to omp parallel statement
+  * changed (wrong) static to stack in normalize_model
+  * xtrans interpolate: incorrect memmove data size
+  * X-Trans/half interpolation: find green pixel based on CFA pattern, not 
pixel values
+  * xtrans_interpolate: fix logic error, interpolation should use original 
pixel values,
+    not ones adjusted on previous tile. Note: 2x image memory needed
+  * mask decodecache index in Sony YCbCr decoder
+  * use local static strnlen version b/c global may be missing
+  * Better gps ref recording
+  * tiff_head: perform strip bytes calculation in 64 bit, check against 2^31-1
+  * CRX decoder: use 64 bit offsets in data
+  * lossless DNG/SOF1-IDCT case: refuse images with tiff_samples > 1
+  * x3f camf matrix setup: size check
+  * implement explicit 6-bit mask on shift argument in pana8 decoder
+  * CRX decoder: clamp qParam table index in legacy quantization path
+  * allocated image size data check implemented in x3f loaded
+  * additional offset check in x3f thumbnail loader
+  * fixed wrong 32=>64 bit conversion in CIFF parser
+  * dng: initialize tone-curve table before OpcodeList2 parsing
+  * Fix: there is no isnan/isinf in MSVC 2010 and older
+  * Initi hassy's tmp_model w/ zeroes
+  * better Hasselblad model parsing
+  * explicitly initialize _fsize for bigfile datastream
+  * add stream validity check before cr3 size checking
+  * Revert "check TIFF tag type for NewSubfileType"
+  * parse_kodak_ifd: fixed possible body name overrun
+  * unset progress bit if open stage failed
+  * X3F utils: data size check added
+  * wavelet denoise/OpenMP case: add missed size initialization
+  * Check for valid float/double in getreal
+  * check TIFF tag type for NewSubfileType
+  * CRX decoder: prevent possible index overrun on damaged files 
+- fixes CVE-2026-88387 [bsc#1282783]
+- deleted patches
+  * libraw-CVE-2026-88387.patch (upstreamed)
+- added patches
+  CVE-2026-135167: a heap out-of-bounds read vulnerability in HuffTable:len() 
[bsc#1291640]
+  * libraw-CVE-2026-135167.patch
+  CVE-2026-135177: an out-of-bounds read vulnerability in 
LibRaw:pentax_4shot_load_raw() [bsc#1291641]
+  * libraw-CVE-2026-135177.patch
+
+-------------------------------------------------------------------

Old:
----
  LibRaw-0.22.2.tar.gz
  libraw-CVE-2026-88387.patch

New:
----
  LibRaw-0.22.3.tar.gz
  libraw-CVE-2026-135167.patch
  libraw-CVE-2026-135177.patch

----------(Old B)----------
  Old:- deleted patches
  * libraw-CVE-2026-88387.patch (upstreamed)
- added patches
----------(Old E)----------

----------(New B)----------
  New:  CVE-2026-135167: a heap out-of-bounds read vulnerability in 
HuffTable:len() [bsc#1291640]
  * libraw-CVE-2026-135167.patch
  CVE-2026-135177: an out-of-bounds read vulnerability in 
LibRaw:pentax_4shot_load_raw() [bsc#1291641]
  New:  CVE-2026-135177: an out-of-bounds read vulnerability in 
LibRaw:pentax_4shot_load_raw() [bsc#1291641]
  * libraw-CVE-2026-135177.patch
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libraw.spec ++++++
--- /var/tmp/diff_new_pack.lrmFuk/_old  2026-11-27 19:41:32.422061328 +0100
+++ /var/tmp/diff_new_pack.lrmFuk/_new  2026-11-27 19:41:32.425061453 +0100
@@ -23,7 +23,7 @@
 %define lver    25
 %define lname  libraw%{lver}
 Name:           libraw
-Version:        0.22.2
+Version:        0.22.3
 Release:        0
 Summary:        Library for reading RAW files obtained from digital photo 
cameras
 License:        CDDL-1.0 OR LGPL-2.1-only
@@ -32,8 +32,10 @@
 #Git-Clone:    git://github.com/LibRaw/LibRaw
 Source0:        https://www.libraw.org/data/%tar_name-%version.tar.gz
 Source1:        baselibs.conf
-# CVE-2026-88387:  incorrect numeric conversion in `LibRaw::parse_tiff_ifd()` 
when processing TIFF tag `0x00fe` can lead to undefined behavior and a process 
crash when a specially crafted file is processed [bsc#1282783]
-Patch0:         libraw-CVE-2026-88387.patch
+# CVE-2026-135167: a heap out-of-bounds read vulnerability in HuffTable:len() 
[bsc#1291640]
+Patch1:         libraw-CVE-2026-135167.patch
+# CVE-2026-135177: an out-of-bounds read vulnerability in 
LibRaw:pentax_4shot_load_raw() [bsc#1291641]
+Patch2:         libraw-CVE-2026-135177.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  fdupes

++++++ LibRaw-0.22.2.tar.gz -> LibRaw-0.22.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/Changelog.txt 
new/LibRaw-0.22.3/Changelog.txt
--- old/LibRaw-0.22.2/Changelog.txt     2026-07-15 08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/Changelog.txt     2026-10-24 11:24:46.000000000 +0200
@@ -1,3 +1,54 @@
+2026-10-24  Alex Tutubalin <[email protected]>
+  LibRaw 0.22.3 Release
+  This is bugfix-only release, see included commits list below.
+
+  * Special notes on CVE-2026-111272:
+    - (as described on author's page): This CVE report is based "only on 
+      static analysis" without attempting to reproduce the issue at runtime.
+    - In fact, "static analysis" failed: it assumes system calloc() use 
+      for memory allocation while LibRaw::calloc() is used in reality.
+    - So, "discovered" OOB-heap accesses by fixed offset(s) are not OOB,
+      all accesses occur within the allocated buffer
+    - The author made no attempts to contact our team.
+    - Our attempts to contact him also went unanswered.
+
+  Summary: this is false positive and a very bad example of reporting 
+  a non-existent vulnerability without trying to contact the vendor.
+
+ Commits included in this release:
+
+  * e8de2d60 destimage var added to omp parallel statement
+  * 11a5f842 changed (wrong) static to stack in normalize_model
+  * b55eef9a xtrans interpolate: incorrect memmove data size
+  * 37ee3956 X-Trans/half interpolation: find green  pixel based on CFA 
pattern, not pixel values
+  * b5b68d15 xtrans_interpolate: fix logic error, interpolation should use 
original pixel values, not ones adjusted on previous tile. Note: 2x image 
memory needed
+  * d7e09495 mask decodecache index in Sony YCbCr decoder
+  * 42c66b63 use local static strnlen version b/c global may be missing
+  * a97291bf Better gps ref recording
+  * 90cea585 tiff_head: perform strip bytes calculation in 64 bit, check 
against 2^31-1
+  * e1be11e2 CRX decoder: use 64 bit offsets in data
+  * a0462027 lossless DNG/SOF1-IDCT case: refuse images with tiff_samples > 1
+  * 1432e690 x3f camf matrix setup: size check
+  * fb2a2e94 implement explicit 6-bit mask on shift argument in pana8 decoder
+  * 4747dab4 CRX decoder: clamp qParam table index in legacy quantization path
+  * a624a732 allocated image size data check implemented in x3f loaded
+  * de356b1b additional offset check in x3f thumbnail loader
+  * 171848ad fixed wrong 32=>64 bit conversion in CIFF parser
+  * fd254378 dng: initialize tone-curve table before OpcodeList2 parsing
+  * d1ea9fe6 Fix: there is no isnan/isinf in MSVC 2010 and older
+  * f6606c19 Initi hassy's tmp_model w/ zeroes
+  * f67f8426 better Hasselblad model parsing
+  * b3ed417d explicitly initialize _fsize for bigfile datastream
+  * a403b25e add stream validity check before cr3 size checking
+  * 8f0ba465 Revert "check TIFF tag type for NewSubfileType"
+  * eaacd850 parse_kodak_ifd: fixed possible body name overrun
+  * 844de590 unset progress bit if open stage failed
+  * 3e4ba1d5 X3F utils: data size check added
+  * 121882f5 wavelet denoise/OpenMP case: add missed size initialization
+  * d48495b6 Check for valid float/double in getreal
+  * 764ace01 check TIFF tag type for NewSubfileType
+  * c9f2931a CRX decoder: prevent possible index overrun on damaged files
+
 2026-07-16  Alex Tutubalin <[email protected]>
   LibRaw 0.22.2 Release
   This is bugfix-only release with these commits included:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/autom4te.cache/output.0 
new/LibRaw-0.22.3/autom4te.cache/output.0
--- old/LibRaw-0.22.2/autom4te.cache/output.0   2026-07-16 07:27:19.000000000 
+0200
+++ new/LibRaw-0.22.3/autom4te.cache/output.0   2026-10-26 12:01:17.000000000 
+0100
@@ -1,6 +1,6 @@
 @%:@! /bin/sh
 @%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.2.
+@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.3.
 @%:@
 @%:@ Report bugs to <[email protected]>.
 @%:@ 
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='LibRaw'
 PACKAGE_TARNAME='libraw'
-PACKAGE_VERSION='0.22.2'
-PACKAGE_STRING='LibRaw 0.22.2'
+PACKAGE_VERSION='0.22.3'
+PACKAGE_STRING='LibRaw 0.22.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='http://www.libraw.org'
 
@@ -1388,7 +1388,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures LibRaw 0.22.2 to adapt to many kinds of systems.
+'configure' configures LibRaw 0.22.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1459,7 +1459,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of LibRaw 0.22.2:";;
+     short | recursive ) echo "Configuration of LibRaw 0.22.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1590,7 +1590,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-LibRaw configure 0.22.2
+LibRaw configure 0.22.3
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1941,7 +1941,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by LibRaw $as_me 0.22.2, which was
+It was created by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3634,7 +3634,7 @@
 
 # Define the identity of the package.
  PACKAGE='libraw'
- VERSION='0.22.2'
+ VERSION='0.22.3'
 
 
 # Some tools Automake needs.
@@ -20175,7 +20175,7 @@
 
 LIBRAW_SHLIB_VERSION=25:0:0
 
-LIBRAW_RELEASE_VERSION=0.22.2
+LIBRAW_RELEASE_VERSION=0.22.3
 
 
 cat >confcache <<\_ACEOF
@@ -20762,7 +20762,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by LibRaw $as_me 0.22.2, which was
+This file was extended by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20822,7 +20822,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-LibRaw config.status 0.22.2
+LibRaw config.status 0.22.3
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/autom4te.cache/output.1 
new/LibRaw-0.22.3/autom4te.cache/output.1
--- old/LibRaw-0.22.2/autom4te.cache/output.1   2026-07-16 07:27:28.000000000 
+0200
+++ new/LibRaw-0.22.3/autom4te.cache/output.1   2026-10-26 12:01:24.000000000 
+0100
@@ -1,6 +1,6 @@
 @%:@! /bin/sh
 @%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.2.
+@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.3.
 @%:@
 @%:@ Report bugs to <[email protected]>.
 @%:@ 
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='LibRaw'
 PACKAGE_TARNAME='libraw'
-PACKAGE_VERSION='0.22.2'
-PACKAGE_STRING='LibRaw 0.22.2'
+PACKAGE_VERSION='0.22.3'
+PACKAGE_STRING='LibRaw 0.22.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='http://www.libraw.org'
 
@@ -1388,7 +1388,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures LibRaw 0.22.2 to adapt to many kinds of systems.
+'configure' configures LibRaw 0.22.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1459,7 +1459,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of LibRaw 0.22.2:";;
+     short | recursive ) echo "Configuration of LibRaw 0.22.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1590,7 +1590,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-LibRaw configure 0.22.2
+LibRaw configure 0.22.3
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1941,7 +1941,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by LibRaw $as_me 0.22.2, which was
+It was created by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3634,7 +3634,7 @@
 
 # Define the identity of the package.
  PACKAGE='libraw'
- VERSION='0.22.2'
+ VERSION='0.22.3'
 
 
 # Some tools Automake needs.
@@ -20175,7 +20175,7 @@
 
 LIBRAW_SHLIB_VERSION=25:0:0
 
-LIBRAW_RELEASE_VERSION=0.22.2
+LIBRAW_RELEASE_VERSION=0.22.3
 
 
 cat >confcache <<\_ACEOF
@@ -20762,7 +20762,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by LibRaw $as_me 0.22.2, which was
+This file was extended by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20822,7 +20822,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-LibRaw config.status 0.22.2
+LibRaw config.status 0.22.3
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/autom4te.cache/output.2 
new/LibRaw-0.22.3/autom4te.cache/output.2
--- old/LibRaw-0.22.2/autom4te.cache/output.2   2026-07-16 07:27:24.000000000 
+0200
+++ new/LibRaw-0.22.3/autom4te.cache/output.2   2026-10-26 12:01:20.000000000 
+0100
@@ -1,6 +1,6 @@
 @%:@! /bin/sh
 @%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.2.
+@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.3.
 @%:@
 @%:@ Report bugs to <[email protected]>.
 @%:@ 
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='LibRaw'
 PACKAGE_TARNAME='libraw'
-PACKAGE_VERSION='0.22.2'
-PACKAGE_STRING='LibRaw 0.22.2'
+PACKAGE_VERSION='0.22.3'
+PACKAGE_STRING='LibRaw 0.22.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='http://www.libraw.org'
 
@@ -1388,7 +1388,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures LibRaw 0.22.2 to adapt to many kinds of systems.
+'configure' configures LibRaw 0.22.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1459,7 +1459,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of LibRaw 0.22.2:";;
+     short | recursive ) echo "Configuration of LibRaw 0.22.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1590,7 +1590,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-LibRaw configure 0.22.2
+LibRaw configure 0.22.3
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1941,7 +1941,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by LibRaw $as_me 0.22.2, which was
+It was created by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3634,7 +3634,7 @@
 
 # Define the identity of the package.
  PACKAGE='libraw'
- VERSION='0.22.2'
+ VERSION='0.22.3'
 
 
 # Some tools Automake needs.
@@ -20175,7 +20175,7 @@
 
 LIBRAW_SHLIB_VERSION=25:0:0
 
-LIBRAW_RELEASE_VERSION=0.22.2
+LIBRAW_RELEASE_VERSION=0.22.3
 
 
 cat >confcache <<\_ACEOF
@@ -20762,7 +20762,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by LibRaw $as_me 0.22.2, which was
+This file was extended by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20822,7 +20822,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-LibRaw config.status 0.22.2
+LibRaw config.status 0.22.3
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/autom4te.cache/output.3 
new/LibRaw-0.22.3/autom4te.cache/output.3
--- old/LibRaw-0.22.2/autom4te.cache/output.3   2026-07-16 07:27:26.000000000 
+0200
+++ new/LibRaw-0.22.3/autom4te.cache/output.3   2026-10-26 12:01:22.000000000 
+0100
@@ -1,6 +1,6 @@
 @%:@! /bin/sh
 @%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.2.
+@%:@ Generated by GNU Autoconf 2.72 for LibRaw 0.22.3.
 @%:@
 @%:@ Report bugs to <[email protected]>.
 @%:@ 
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='LibRaw'
 PACKAGE_TARNAME='libraw'
-PACKAGE_VERSION='0.22.2'
-PACKAGE_STRING='LibRaw 0.22.2'
+PACKAGE_VERSION='0.22.3'
+PACKAGE_STRING='LibRaw 0.22.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='http://www.libraw.org'
 
@@ -1388,7 +1388,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures LibRaw 0.22.2 to adapt to many kinds of systems.
+'configure' configures LibRaw 0.22.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1459,7 +1459,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of LibRaw 0.22.2:";;
+     short | recursive ) echo "Configuration of LibRaw 0.22.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1590,7 +1590,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-LibRaw configure 0.22.2
+LibRaw configure 0.22.3
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1941,7 +1941,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by LibRaw $as_me 0.22.2, which was
+It was created by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3634,7 +3634,7 @@
 
 # Define the identity of the package.
  PACKAGE='libraw'
- VERSION='0.22.2'
+ VERSION='0.22.3'
 
 
 # Some tools Automake needs.
@@ -20175,7 +20175,7 @@
 
 LIBRAW_SHLIB_VERSION=25:0:0
 
-LIBRAW_RELEASE_VERSION=0.22.2
+LIBRAW_RELEASE_VERSION=0.22.3
 
 
 cat >confcache <<\_ACEOF
@@ -20762,7 +20762,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by LibRaw $as_me 0.22.2, which was
+This file was extended by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20822,7 +20822,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-LibRaw config.status 0.22.2
+LibRaw config.status 0.22.3
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/autom4te.cache/traces.1 
new/LibRaw-0.22.3/autom4te.cache/traces.1
--- old/LibRaw-0.22.2/autom4te.cache/traces.1   2026-07-16 07:27:28.000000000 
+0200
+++ new/LibRaw-0.22.3/autom4te.cache/traces.1   2026-10-26 12:01:24.000000000 
+0100
@@ -7,7 +7,7 @@
 m4trace:aclocal.m4:1672: -1- m4_include([m4/ltsugar.m4])
 m4trace:aclocal.m4:1673: -1- m4_include([m4/ltversion.m4])
 m4trace:aclocal.m4:1674: -1- m4_include([m4/lt~obsolete.m4])
-m4trace:configure.ac:2: -1- AC_INIT([LibRaw], [0.22.2], [[email protected]], [], 
[http://www.libraw.org])
+m4trace:configure.ac:2: -1- AC_INIT([LibRaw], [0.22.3], [[email protected]], [], 
[http://www.libraw.org])
 m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
 m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
 m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS 
directly, use AC_LIBOBJ (see section 'AC_LIBOBJ vs LIBOBJS'])
@@ -671,7 +671,7 @@
 m4trace:configure.ac:125: -1- AC_SUBST([LIBRAW_SHLIB_VERSION], [25:0:0])
 m4trace:configure.ac:125: -1- AC_SUBST_TRACE([LIBRAW_SHLIB_VERSION])
 m4trace:configure.ac:125: -1- m4_pattern_allow([^LIBRAW_SHLIB_VERSION$])
-m4trace:configure.ac:126: -1- AC_SUBST([LIBRAW_RELEASE_VERSION], [0.22.2])
+m4trace:configure.ac:126: -1- AC_SUBST([LIBRAW_RELEASE_VERSION], [0.22.3])
 m4trace:configure.ac:126: -1- AC_SUBST_TRACE([LIBRAW_RELEASE_VERSION])
 m4trace:configure.ac:126: -1- m4_pattern_allow([^LIBRAW_RELEASE_VERSION$])
 m4trace:configure.ac:128: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/autom4te.cache/traces.3 
new/LibRaw-0.22.3/autom4te.cache/traces.3
--- old/LibRaw-0.22.2/autom4te.cache/traces.3   2026-07-16 07:27:26.000000000 
+0200
+++ new/LibRaw-0.22.3/autom4te.cache/traces.3   2026-10-26 12:01:22.000000000 
+0100
@@ -7,7 +7,7 @@
 m4trace:aclocal.m4:1672: -1- m4_include([m4/ltsugar.m4])
 m4trace:aclocal.m4:1673: -1- m4_include([m4/ltversion.m4])
 m4trace:aclocal.m4:1674: -1- m4_include([m4/lt~obsolete.m4])
-m4trace:configure.ac:2: -1- AC_INIT([LibRaw], [0.22.2], [[email protected]], [], 
[http://www.libraw.org])
+m4trace:configure.ac:2: -1- AC_INIT([LibRaw], [0.22.3], [[email protected]], [], 
[http://www.libraw.org])
 m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
 m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
 m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS 
directly, use AC_LIBOBJ (see section 'AC_LIBOBJ vs LIBOBJS'])
@@ -670,7 +670,7 @@
 m4trace:configure.ac:125: -1- AC_SUBST([LIBRAW_SHLIB_VERSION], [25:0:0])
 m4trace:configure.ac:125: -1- AC_SUBST_TRACE([LIBRAW_SHLIB_VERSION])
 m4trace:configure.ac:125: -1- m4_pattern_allow([^LIBRAW_SHLIB_VERSION$])
-m4trace:configure.ac:126: -1- AC_SUBST([LIBRAW_RELEASE_VERSION], [0.22.2])
+m4trace:configure.ac:126: -1- AC_SUBST([LIBRAW_RELEASE_VERSION], [0.22.3])
 m4trace:configure.ac:126: -1- AC_SUBST_TRACE([LIBRAW_RELEASE_VERSION])
 m4trace:configure.ac:126: -1- m4_pattern_allow([^LIBRAW_RELEASE_VERSION$])
 m4trace:configure.ac:128: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/configure new/LibRaw-0.22.3/configure
--- old/LibRaw-0.22.2/configure 2026-07-16 07:27:27.000000000 +0200
+++ new/LibRaw-0.22.3/configure 2026-10-26 12:01:23.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for LibRaw 0.22.2.
+# Generated by GNU Autoconf 2.72 for LibRaw 0.22.3.
 #
 # Report bugs to <[email protected]>.
 #
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='LibRaw'
 PACKAGE_TARNAME='libraw'
-PACKAGE_VERSION='0.22.2'
-PACKAGE_STRING='LibRaw 0.22.2'
+PACKAGE_VERSION='0.22.3'
+PACKAGE_STRING='LibRaw 0.22.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='http://www.libraw.org'
 
@@ -1388,7 +1388,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures LibRaw 0.22.2 to adapt to many kinds of systems.
+'configure' configures LibRaw 0.22.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1459,7 +1459,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of LibRaw 0.22.2:";;
+     short | recursive ) echo "Configuration of LibRaw 0.22.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1590,7 +1590,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-LibRaw configure 0.22.2
+LibRaw configure 0.22.3
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1941,7 +1941,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by LibRaw $as_me 0.22.2, which was
+It was created by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3634,7 +3634,7 @@
 
 # Define the identity of the package.
  PACKAGE='libraw'
- VERSION='0.22.2'
+ VERSION='0.22.3'
 
 
 # Some tools Automake needs.
@@ -20175,7 +20175,7 @@
 
 LIBRAW_SHLIB_VERSION=25:0:0
 
-LIBRAW_RELEASE_VERSION=0.22.2
+LIBRAW_RELEASE_VERSION=0.22.3
 
 
 cat >confcache <<\_ACEOF
@@ -20762,7 +20762,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by LibRaw $as_me 0.22.2, which was
+This file was extended by LibRaw $as_me 0.22.3, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20822,7 +20822,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-LibRaw config.status 0.22.2
+LibRaw config.status 0.22.3
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/internal/losslessjpeg.h 
new/LibRaw-0.22.3/internal/losslessjpeg.h
--- old/LibRaw-0.22.2/internal/losslessjpeg.h   2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/internal/losslessjpeg.h   2026-10-24 11:24:46.000000000 
+0200
@@ -133,6 +133,7 @@
 
 
 const uint32_t LIBRAW_DECODE_CACHE_BITS = 13;
+const uint32_t LIBRAW_DECODE_CACHE_MASK = (1<< LIBRAW_DECODE_CACHE_BITS)-1;
 const uint64_t LIBRAW_CACHE_PRESENT_FLAG = 0x100000000L;
 
 struct HuffTable
@@ -151,7 +152,7 @@
 
        int32_t decode(BitPump& pump)
     {
-      uint64_t cached = disable_cache ? 0 : 
decodecache[pump.peek(LIBRAW_DECODE_CACHE_BITS)];
+      uint64_t cached = disable_cache ? 0 : 
decodecache[pump.peek(LIBRAW_DECODE_CACHE_BITS) & LIBRAW_DECODE_CACHE_MASK];
       if (cached & LIBRAW_CACHE_PRESENT_FLAG)
       {
         uint32_t _bits = (cached >> 16) & 0xff;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/libraw/libraw_version.h 
new/LibRaw-0.22.3/libraw/libraw_version.h
--- old/LibRaw-0.22.2/libraw/libraw_version.h   2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/libraw/libraw_version.h   2026-10-24 11:24:46.000000000 
+0200
@@ -22,7 +22,7 @@
 
 #define LIBRAW_MAJOR_VERSION 0
 #define LIBRAW_MINOR_VERSION 22
-#define LIBRAW_PATCH_VERSION 2
+#define LIBRAW_PATCH_VERSION 3
 #define LIBRAW_VERSION_TAIL Release
 
 #define LIBRAW_SHLIB_CURRENT 25
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/decoders/crx.cpp 
new/LibRaw-0.22.3/src/decoders/crx.cpp
--- old/LibRaw-0.22.2/src/decoders/crx.cpp      2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/decoders/crx.cpp      2026-10-24 11:24:46.000000000 
+0200
@@ -1112,7 +1112,7 @@
   else
   {
     // prev. version
-    int32_t qScale = q_step_tbl[band->qParam % 6] >> (6 - band->qParam / 6);
+    int32_t qScale = q_step_tbl[MAX(0, band->qParam % 6)] >> (6 - band->qParam 
/ 6);
     if (band->qParam / 6 >= 6)
       qScale = q_step_tbl[band->qParam % 6] * (1 << (band->qParam / 6 + 26));
 
@@ -1661,7 +1661,7 @@
 {
   if (lineData)
   {
-    uint64_t rawOffset = 4 * img->planeWidth * imageRow + 2 * imageCol;
+    uint64_t rawOffset = 4ULL * uint64_t(img->planeWidth) * uint64_t(imageRow) 
+ 2ULL * uint64_t(imageCol);
     if (img->encType == 1)
     {
       int32_t maxVal = 1 << (img->nBits - 1);
@@ -1703,7 +1703,7 @@
 
     int32_t median = (1 << (img->medianBits - 1)) << 10;
     int32_t maxVal = (1 << img->medianBits) - 1;
-    uint32_t rawLineOffset = 4 * img->planeWidth * imageRow;
+    uint64_t rawLineOffset = 4ULL * uint64_t(img->planeWidth) * 
uint64_t(imageRow);
 
     // for this stage - all except imageRow is ignored
     for (int i = 0; i < img->planeWidth; i++)
@@ -2035,7 +2035,7 @@
         if (quantVal / 6 >= 6)
           *qStepTbl = q_step_tbl[quantVal % 6] << ((quantVal / 6 - 6 ) & 0x1f);
         else
-          *qStepTbl = q_step_tbl[quantVal % 6] >> (6 - quantVal / 6);
+          *qStepTbl = q_step_tbl[MAX(0,quantVal % 6)] >> (6 - quantVal / 6);
       }
     }
     // continue to the next level - we always decode all levels
@@ -2055,7 +2055,7 @@
         if (quantVal / 6 >= 6)
           *qStepTbl = q_step_tbl[quantVal % 6] << ((quantVal / 6 - 6) & 0x1f);
         else
-          *qStepTbl = q_step_tbl[quantVal % 6] >> (6 - quantVal / 6);
+          *qStepTbl = q_step_tbl[MAX(0,quantVal % 6)] >> (6 - quantVal / 6);
       }
     }
     // continue to the next level - we always decode all levels
@@ -2069,7 +2069,7 @@
         if (*qpTable / 6 >= 6)
           *qStepTbl = q_step_tbl[*qpTable % 6] << ((*qpTable / 6 - 6) & 0x1f);
         else
-          *qStepTbl = q_step_tbl[*qpTable % 6] >> (6 - *qpTable / 6);
+          *qStepTbl = q_step_tbl[MAX(0,(*qpTable % 6))] >> (6 - *qpTable / 6);
 
     break;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/decoders/dng.cpp 
new/LibRaw-0.22.3/src/decoders/dng.cpp
--- old/LibRaw-0.22.2/src/decoders/dng.cpp      2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/decoders/dng.cpp      2026-10-24 11:24:46.000000000 
+0200
@@ -82,6 +82,8 @@
       switch (jh.algo)
       {
       case 0xc1:
+               if (tiff_samples > 1)
+                       throw LIBRAW_EXCEPTION_IO_CORRUPT;
         jh.vpred[0] = 16384;
         getbits(-1);
         for (jrow = 0; jrow + 7 < (unsigned)jh.high; jrow += 8)
@@ -197,6 +199,12 @@
   ushort cur[4][256];
   double coeff[9], tot;
 
+  // Initialize the whole curve table with the default gamma curve first:
+  // an OpcodeList2 tag (meta_offset) carrying zero opcodes, or none of type
+  // PolynomialMap(8), must not leave cur[][] uninitialized.
+  gamma_curve(1 / 2.4, 12.92, 1, 255);
+  FORC4 memcpy(cur[c], curve, sizeof cur[0]);
+
   if (meta_offset)
   {
     fseek(ifp, meta_offset, SEEK_SET);
@@ -229,11 +237,6 @@
     }
     order = sorder;
   }
-  else
-  {
-    gamma_curve(1 / 2.4, 12.92, 1, 255);
-    FORC4 memcpy(cur[c], curve, sizeof cur[0]);
-  }
 
   struct jpeg_error_mgr pub;
   cinfo.err = jpeg_std_error(&pub);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/decoders/pana8.cpp 
new/LibRaw-0.22.3/src/decoders/pana8.cpp
--- old/LibRaw-0.22.2/src/decoders/pana8.cpp    2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/decoders/pana8.cpp    2026-10-24 11:24:46.000000000 
+0200
@@ -253,7 +253,7 @@
                          uint32_t hc = huff_coeff[huff_index];
                          int64_t v38 = pixbits << (((hc >> 16) & 0xffffu) & 
0x1F);
                          uint64_t v90 = (uint32_t)(huff_index - v37);
-                         int32_t v39 = (uint16_t)((uint64_t)v38 >> 
((uint8_t)v37 - (uint8_t)huff_index)) << ((huff_coeff[huff_index] >> 24) & 
0xffu);
+                         int32_t v39 = (uint16_t)((uint64_t)v38 >> 
(((uint8_t)v37 - (uint8_t)huff_index)&63)) << ((huff_coeff[huff_index] >> 24) & 
63);
 
                          if (huff_index - v37 <= 0)
                                  v39 &= 0xffff0000u;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/demosaic/misc_demosaic.cpp 
new/LibRaw-0.22.3/src/demosaic/misc_demosaic.cpp
--- old/LibRaw-0.22.2/src/demosaic/misc_demosaic.cpp    2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/demosaic/misc_demosaic.cpp    2026-10-24 
11:24:46.000000000 +0200
@@ -31,6 +31,24 @@
       width = iwidth;
       if (filters == 9)
       {
+        /* Find the all-green half-size phase from the CFA layout: scanning
+           pixel values for R == B == 0 picks a wrong phase when the top-left
+           corner is dark and noisy. */
+        int grow = -1, gcol = -1;
+        for (int r = 0; r < 3 && grow < 0; r++)
+          for (int k = 0; k < 3 && grow < 0; k++)
+            if (fcol(2 * r, 2 * k) == 1 && fcol(2 * r, 2 * k + 1) == 1 &&
+                fcol(2 * r + 1, 2 * k) == 1 && fcol(2 * r + 1, 2 * k + 1) == 1)
+            {
+              grow = r;
+              gcol = k ? k : 3; /* the fill below reads img[-1] */
+            }
+        if (grow >= 0)
+        {
+          row = grow;
+          col = gcol;
+          goto break2;
+        }
         for (row = 0; row < 3; row++)
           for (col = 1; col < 4; col++)
             if (!(image[row * width + col][0] | image[row * width + col][2]))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/demosaic/xtrans_demosaic.cpp 
new/LibRaw-0.22.3/src/demosaic/xtrans_demosaic.cpp
--- old/LibRaw-0.22.2/src/demosaic/xtrans_demosaic.cpp  2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/demosaic/xtrans_demosaic.cpp  2026-10-24 
11:24:46.000000000 +0200
@@ -173,9 +173,13 @@
 
   size_t buffer_size = LIBRAW_AHD_TILE * LIBRAW_AHD_TILE * (ndir * 11 + 6);
   char** buffers = malloc_omp_buffers(buffer_count, buffer_size);
+  INT64 allocate_sz = (INT64(iheight) + 6) * (INT64(iwidth) + 6) * 
sizeof(ushort)*4LL;
+    ushort (*destimage)[4] = (ushort(*)[4])calloc(allocate_sz, 1);
+  // For border interpolate: keep original pixels
+  memmove(destimage,image,allocate_sz);
 
 #if defined(LIBRAW_USE_OPENMP)
-# pragma omp parallel for schedule(dynamic) default(none) 
firstprivate(buffers, allhex, passes, sgrow, sgcol, ndir) shared(dir) 
+# pragma omp parallel for schedule(dynamic) default(none) 
firstprivate(buffers, allhex, passes, sgrow, sgcol, ndir) shared(dir, 
destimage) 
 #endif
     for (int top = 3; top < height - 19; top += LIBRAW_AHD_TILE - 16)
     {
@@ -420,7 +424,7 @@
                             FORC3 avg[c] += rgb[dd][row][col][c];
                             avg[3]++;
                         }
-                    FORC3 image[(row + top) * width + col + left][c] = avg[c] 
/ avg[3];
+                    FORC3 destimage[(row + top) * width + col + left][c] = 
avg[c] / avg[3];
                 }
         }
     }
@@ -430,6 +434,8 @@
 #endif
 
     free_omp_buffers(buffers, buffer_count);
+    free(image);
+    image = destimage;
 
     border_interpolate(8);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/libraw_datastream.cpp 
new/LibRaw-0.22.3/src/libraw_datastream.cpp
--- old/LibRaw-0.22.2/src/libraw_datastream.cpp 2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/libraw_datastream.cpp 2026-10-24 11:24:46.000000000 
+0200
@@ -464,7 +464,7 @@
 
 // == LibRaw_bigfile_datastream
 LibRaw_bigfile_datastream::LibRaw_bigfile_datastream(const char *fname)
-    : filename(fname)
+    : filename(fname),_fsize(0)
 #ifdef LIBRAW_WIN32_UNICODEPATHS
       ,
       wfilename()
@@ -498,7 +498,7 @@
 
 #ifdef LIBRAW_WIN32_UNICODEPATHS
 LibRaw_bigfile_datastream::LibRaw_bigfile_datastream(const wchar_t *fname)
-    : filename(), wfilename(fname)
+    : filename(), _fsize(0), wfilename(fname)
 {
   if (wfilename.size() > 0)
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/metadata/ciff.cpp 
new/LibRaw-0.22.3/src/metadata/ciff.cpp
--- old/LibRaw-0.22.2/src/metadata/ciff.cpp     2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/metadata/ciff.cpp     2026-10-24 11:24:46.000000000 
+0200
@@ -124,7 +124,8 @@
     {
       fread(make, 64, 1, ifp);
       make[63] = 0;
-      fseek(ifp, strbuflen(make) - 63, SEEK_CUR);
+         int mlen = (int)strbuflen(make);
+      fseek(ifp, mlen - 63, SEEK_CUR);
       fread(model, 64, 1, ifp);
       model[63] = 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/metadata/hasselblad_model.cpp 
new/LibRaw-0.22.3/src/metadata/hasselblad_model.cpp
--- old/LibRaw-0.22.2/src/metadata/hasselblad_model.cpp 2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/metadata/hasselblad_model.cpp 2026-10-24 
11:24:46.000000000 +0200
@@ -103,6 +103,8 @@
   int add_MP_toName = 1;
   int norm_model_isSet = 0;
 
+  memset(tmp_model, 0, sizeof(tmp_model));
+
   if (model[0] == ' ')
     memmove(model, model+1, MIN(sizeof(model)-1,strlen(model)));
 
@@ -187,14 +189,15 @@
   FORC(int(sizeof Hasselblad_Ctrl / sizeof *Hasselblad_Ctrl)) {
     if (strcasestr(model, Hasselblad_Ctrl[c])) {
 // yes, fill 'model' with sensor unit data
-      strncpy(model, tmp_model,63);
+         if(strlen(tmp_model))
+               strncpy(model, tmp_model,63);
       model[63] = 0;
       break;
     }
   }
 
-  if (!imHassy.HostBody[0]) {
-    ps = strchr(model, '-');
+  if (!imHassy.HostBody[0] && strlen(model) > 2 ) {
+    ps = strchr(model+2, '-');
     if (ps) {                  // check if model contains both host body and 
sensor version, resolution, MS info
       strncpy(imHassy.SensorUnit, model,63);
       memcpy(imHassy.HostBody, model, ps-model);
@@ -208,7 +211,8 @@
       strncpy(imHassy.HostBody, model,63);
       imHassy.HostBody[63] = 0;
   // fill 'model' with sensor unit data
-      strncpy(model, tmp_model,63);
+      if (strlen(tmp_model))
+        strncpy(model, tmp_model, 63);
       model[63] = 0;
     }
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/metadata/kodak.cpp 
new/LibRaw-0.22.3/src/metadata/kodak.cpp
--- old/LibRaw-0.22.2/src/metadata/kodak.cpp    2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/metadata/kodak.cpp    2026-10-24 11:24:46.000000000 
+0200
@@ -168,7 +168,8 @@
             {
               c++;
             }
-            strcpy(ilm.body, pkti + c);
+            strncpy(ilm.body, pkti + c,63);
+                       ilm.body[63] = 0;
           }
           c = 5;
           if (((int)strlen(pkti) > c) && (!strncasecmp(pkti, "Lens:", c)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/metadata/normalize_model.cpp 
new/LibRaw-0.22.3/src/metadata/normalize_model.cpp
--- old/LibRaw-0.22.2/src/metadata/normalize_model.cpp  2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/metadata/normalize_model.cpp  2026-10-24 
11:24:46.000000000 +0200
@@ -400,7 +400,7 @@
       { SonyID_ILME_FX2,       "ILME-FX2"},
 };
 
-  static const char *orig;
+   const char *orig = NULL;
 
   static const char fujialias[][16] = {
     "@DBP for GX680", "DX-2000",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/LibRaw-0.22.2/src/postprocessing/postprocessing_aux.cpp 
new/LibRaw-0.22.3/src/postprocessing/postprocessing_aux.cpp
--- old/LibRaw-0.22.2/src/postprocessing/postprocessing_aux.cpp 2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/postprocessing/postprocessing_aux.cpp 2026-10-24 
11:24:46.000000000 +0200
@@ -147,6 +147,7 @@
   maximum <<= --scale;
   black <<= scale;
   FORC4 cblack[c] <<= scale;
+  size = iheight * iwidth;
   fimg = (float *)malloc((size * 3 + iheight + iwidth) * sizeof *fimg);
   temp = fimg + size * 3;
   if ((nc = colors) == 3 && filters)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/utils/open.cpp 
new/LibRaw-0.22.3/src/utils/open.cpp
--- old/LibRaw-0.22.2/src/utils/open.cpp        2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/utils/open.cpp        2026-10-24 11:24:46.000000000 
+0200
@@ -148,6 +148,7 @@
     {
         delete stream;
         ID.input_internal = 0;
+               imgdata.progress_flags = LIBRAW_PROGRESS_START;
     }
     return ret;
 }
@@ -168,6 +169,11 @@
         recycle();
         return LIBRAW_UNSUFFICIENT_MEMORY;
     }
+    if (!stream->valid())
+    {
+      delete stream;
+      return LIBRAW_IO_ERROR;
+    }
     if ((stream->size() > (INT64)LIBRAW_MAX_NONDNG_RAW_FILE_SIZE) 
                && (stream->size() > (INT64)LIBRAW_MAX_DNG_RAW_FILE_SIZE)
                && (stream->size() > (INT64)LIBRAW_MAX_CR3_RAW_FILE_SIZE)
@@ -202,6 +208,11 @@
         recycle();
         return LIBRAW_UNSUFFICIENT_MEMORY;
     }
+    if (!stream->valid())
+    {
+      delete stream;
+      return LIBRAW_IO_ERROR;
+    }
     if ((stream->size() > (INT64)LIBRAW_MAX_DNG_RAW_FILE_SIZE) 
                && (stream->size() > (INT64)LIBRAW_MAX_NONDNG_RAW_FILE_SIZE) &&
         (stream->size() > (INT64)LIBRAW_MAX_CR3_RAW_FILE_SIZE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/utils/read_utils.cpp 
new/LibRaw-0.22.3/src/utils/read_utils.cpp
--- old/LibRaw-0.22.2/src/utils/read_utils.cpp  2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/utils/read_utils.cpp  2026-10-24 11:24:46.000000000 
+0200
@@ -17,6 +17,14 @@
  */
 
 #include "../../internal/dcraw_defs.h"
+#include <math.h>
+
+#if defined(_MSC_VER) && (_MSC_VER <= 1600) 
+#include <float.h>
+#define isnan(a) _isnan(a)
+#define isinf(x) (!_finite(x) && !_isnan(x))
+#endif
+
 
 ushort LibRaw::sget2Rev(uchar *s) // specific to some Canon Makernotes fields,
                                   // where they have endian in reverse
@@ -79,6 +87,8 @@
     float f;
   } u;
   u.i = i;
+  if (isnan(u.f) || isinf(u.f))
+         return 0.f;
   return u.f;
 }
 
@@ -116,6 +126,8 @@
     rev = 7 * ((order == 0x4949) == (ntohs(0x1234) == 0x1234));
     for (i = 0; i < 8; i++)
       u.c[i ^ rev] = fgetc(ifp);
+    if (isnan(u.d) || isinf(u.d))
+      return 0.f;
     return u.d;
   default:
     return fgetc(ifp);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/write/file_write.cpp 
new/LibRaw-0.22.3/src/write/file_write.cpp
--- old/LibRaw-0.22.2/src/write/file_write.cpp  2026-07-15 08:00:07.000000000 
+0200
+++ new/LibRaw-0.22.3/src/write/file_write.cpp  2026-10-24 11:24:46.000000000 
+0200
@@ -53,6 +53,30 @@
   tt->tag = tag;
 }
 
+// local strnlen: we cannot use LibRaw::strnlen b/c it is protected
+static size_t local_static_strnlen(const char *s, size_t n)
+{
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
+  const char *p = (const char *)memchr(s, 0, n);
+  return (p ? p - s : n);
+#else
+  return strnlen(s, n);
+#endif
+}
+
+
+static void tiff_set_str4(struct tiff_hdr *th, ushort *ntag, ushort tag, 
ushort type, int count, const uchar* val)
+{
+  struct libraw_tiff_tag *tt;
+  int c;
+  tt = (struct libraw_tiff_tag *)(ntag + 1) + (*ntag)++;
+  count = int(local_static_strnlen((const char*)val, count-1)) + 1;
+  FORC(4) tt->val.c[c] = val[c];
+  tt->count = count;
+  tt->type = type;
+  tt->tag = tag;
+}
+
 #define TOFF(ptr) int((char *)(&(ptr)) - (char *)th)
 
 void LibRaw::tiff_head(struct tiff_hdr *th, int full)
@@ -100,8 +124,11 @@
     tiff_set(th, &th->ntag, 273, 4, 1, sizeof *th + psize);
     tiff_set(th, &th->ntag, 277, 3, 1, colors);
     tiff_set(th, &th->ntag, 278, 4, 1, height);
-    tiff_set(th, &th->ntag, 279, 4, 1,
-             height * width * colors * output_bps / 8);
+       INT64 strip_bytes = INT64(height) * INT64(width) * INT64(colors) * 
INT64(output_bps) / 8LL;
+       if (strip_bytes >= 2147483647LL)
+               throw LIBRAW_EXCEPTION_TOOBIG; // bigtiff is not supported...
+       int strip_bytes_32 = strip_bytes;
+       tiff_set(th, &th->ntag, 279, 4, 1, strip_bytes_32);
   }
   else
     tiff_set(th, &th->ntag, 274, 3, 1, "12435867"[flip] - '0');
@@ -125,9 +152,9 @@
           lonref[4] = { (uchar)(gpsdata[30]),0,0,0 };
     tiff_set(th, &th->ntag, 34853, 4, 1, TOFF(th->ngps));
     tiff_set(th, &th->ngps, 0, 1, 4, 0x202);
-    tiff_set(th, &th->ngps, 1, 2, 2, TOFF(latref));
+    tiff_set_str4(th, &th->ngps, 1, 2, 2, latref);
     tiff_set(th, &th->ngps, 2, 5, 3, TOFF(th->gps[0]));
-    tiff_set(th, &th->ngps, 3, 2, 2, TOFF(lonref));
+    tiff_set_str4(th, &th->ngps, 3, 2, 2, lonref);
     tiff_set(th, &th->ngps, 4, 5, 3, TOFF(th->gps[6]));
     tiff_set(th, &th->ngps, 5, 1, 1, gpsdata[31]);
     tiff_set(th, &th->ngps, 6, 5, 1, TOFF(th->gps[18]));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/x3f/x3f_parse_process.cpp 
new/LibRaw-0.22.3/src/x3f/x3f_parse_process.cpp
--- old/LibRaw-0.22.2/src/x3f/x3f_parse_process.cpp     2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/x3f/x3f_parse_process.cpp     2026-10-24 
11:24:46.000000000 +0200
@@ -377,7 +377,7 @@
       for (int row = 0; row < (int)ID->rows; row++)
       {
         int offset = row * ID->row_stride;
-        if (offset + ID->columns * 3 > ID->data_size)
+        if (offset + ID->columns * 3 > ID->data_size || offset < 0)
           break;
         char *dest = &imgdata.thumbnail.thumb[row * ID->columns * 3];
         char *src = &src0[offset];
@@ -618,7 +618,11 @@
       goto end;
     }
 
-    size_t datasize = S.raw_height * S.raw_width * 3 * sizeof(unsigned short);
+    INT64 datasize = INT64(S.raw_height) * INT64(S.raw_width) * 3LL * 
sizeof(unsigned short);
+
+       if (datasize > LIBRAW_X3F_ALLOC_LIMIT_MB * 1024ULL * 1024ULL)
+      throw LIBRAW_EXCEPTION_TOOBIG;
+
     S.raw_pitch = S.raw_width * 3 * sizeof(unsigned short);
     if (!(imgdata.rawdata.raw_alloc = malloc(datasize)))
       throw LIBRAW_EXCEPTION_ALLOC;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LibRaw-0.22.2/src/x3f/x3f_utils_patched.cpp 
new/LibRaw-0.22.3/src/x3f/x3f_utils_patched.cpp
--- old/LibRaw-0.22.2/src/x3f/x3f_utils_patched.cpp     2026-07-15 
08:00:07.000000000 +0200
+++ new/LibRaw-0.22.3/src/x3f/x3f_utils_patched.cpp     2026-10-24 
11:24:46.000000000 +0200
@@ -879,13 +879,15 @@
 typedef struct bit_state_s
 {
   uint8_t *next_address;
+  uint8_t *last_address;
   uint8_t bit_offset;
   uint8_t bits[8];
 } bit_state_t;
 
-static void set_bit_state(bit_state_t *BS, uint8_t *address)
+static void set_bit_state(bit_state_t *BS, uint8_t *address, uint8_t* 
last_addr)
 {
   BS->next_address = address;
+  BS->last_address = last_addr;
   BS->bit_offset = 8;
 }
 
@@ -902,6 +904,8 @@
       byte = byte >> 1;
     }
     BS->next_address++;
+       if (BS->next_address > BS->last_address) 
+               throw LIBRAW_EXCEPTION_IO_CORRUPT;
     BS->bit_offset = 0;
   }
 
@@ -977,7 +981,7 @@
   x3f_area16_t *area = &TRU->x3rgb16;
   uint16_t *dst = area->data + color;
 
-  set_bit_state(&BS, TRU->plane_address[color]);
+  set_bit_state(&BS, 
TRU->plane_address[color],(uint8_t*)ID->data+ID->data_size);
 
   row_start_acc[0][0] = seed;
   row_start_acc[0][1] = seed;
@@ -1083,7 +1087,7 @@
 
   if (HUF->row_offsets.element[row] > ID->data_size - 1)
          throw LIBRAW_EXCEPTION_IO_CORRUPT;
-  set_bit_state(&BS, (uint8_t *)ID->data + HUF->row_offsets.element[row]);
+  set_bit_state(&BS, (uint8_t *)ID->data + HUF->row_offsets.element[row], 
(uint8_t*)ID->data+ID->data_size);
 
   for (col = 0; col < (int)ID->columns; col++)
   {
@@ -1389,6 +1393,14 @@
 #endif
 
   TRU->plane_address[0] = (uint8_t *)ID->data;
+  // Check for total plane size
+  uint64_t psz = 0;
+  for (i = 0; i < TRUE_PLANES; i++)
+         psz += (((TRU->plane_size.element[i] + 15) / 16) * 16);
+
+  if (psz > ID->data_size)
+         throw LIBRAW_EXCEPTION_IO_CORRUPT;
+
   for (i = 1; i < TRUE_PLANES; i++)
     TRU->plane_address[i] = TRU->plane_address[i - 1] +
                             (((TRU->plane_size.element[i - 1] + 15) / 16) * 
16);
@@ -1679,7 +1691,7 @@
   dst = (uint8_t *)CAMF->decoded_data;
   dst_end = dst + dst_size;
 
-  set_bit_state(&BS, CAMF->decoding_start);
+  set_bit_state(&BS, 
CAMF->decoding_start,(uint8_t*)CAMF->data+CAMF->data_size);
 
   row_start_acc[0][0] = seed;
   row_start_acc[0][1] = seed;
@@ -1797,7 +1809,7 @@
 
   dst = (uint8_t *)CAMF->decoded_data;
 
-  set_bit_state(&BS, CAMF->decoding_start);
+  set_bit_state(&BS, 
CAMF->decoding_start,(uint8_t*)CAMF->data+CAMF->data_size);
 
   for (i = 0; i < (int)CAMF->decoded_data_size; i++)
   {
@@ -1977,7 +1989,7 @@
 static void x3f_setup_camf_matrix_entry(camf_entry_t *entry)
 {
   int i;
-  int totalsize = 1;
+  INT64 totalsize = 1LL;
 
   uint8_t *e = (uint8_t *)entry->entry;
   uint8_t *v = (uint8_t *)entry->value_address;
@@ -1998,13 +2010,17 @@
     {
     }
 
-    totalsize *= size;
+    totalsize *=  INT64(size);
   }
 
   set_matrix_element_info(type, &entry->matrix_element_size,
                           &entry->matrix_decoded_type);
   entry->matrix_data = (void *)(e + off);
 
+  INT64 alloc_size = (entry->matrix_decoded_type == M_FLOAT ? sizeof(double) : 
sizeof(uint32_t)) * totalsize;
+  if (alloc_size > LIBRAW_X3F_ALLOC_LIMIT_MB * 1024ULL * 1024ULL)
+    throw LIBRAW_EXCEPTION_TOOBIG;
+
   entry->matrix_elements = totalsize;
   entry->matrix_used_space = entry->entry_size - off;
 

++++++ libraw-CVE-2026-88387.patch -> libraw-CVE-2026-135167.patch ++++++
--- /work/SRC/openSUSE:Factory/libraw/libraw-CVE-2026-88387.patch       
2026-09-30 16:22:58.826170459 +0200
+++ /work/SRC/openSUSE:Factory/.libraw.new.1340718/libraw-CVE-2026-135167.patch 
2026-11-27 19:41:31.330015898 +0100
@@ -1,24 +1,43 @@
-From b41cbbd61951783e0440590dae55411a16185bdf Mon Sep 17 00:00:00 2001
+From d270dbf557ff1f68757e1b93a84b91c3c1a13ce7 Mon Sep 17 00:00:00 2001
 From: Alex Tutubalin <[email protected]>
-Date: Sat, 5 Sep 2026 09:36:40 +0300
-Subject: [PATCH] check TIFF tag type for NewSubfileType
+Date: Wed, 18 Nov 2026 18:28:03 +0300
+Subject: [PATCH] Sony YCC decoder: mask hufftable index
 
 ---
- src/metadata/tiff.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/metadata/tiff.cpp b/src/metadata/tiff.cpp
-index bad65053..e7168394 100644
---- a/src/metadata/tiff.cpp
-+++ b/src/metadata/tiff.cpp
-@@ -569,7 +569,8 @@ int LibRaw::parse_tiff_ifd(INT64 base)
-       parse_tiff_ifd(base);
-       break;
-     case 0x00fe: /* NewSubfileType */
--      tiff_ifd[ifd].newsubfiletype = int(getreal(type));
-+              if((type != LIBRAW_EXIFTAG_TYPE_FLOAT) && (type != 
LIBRAW_EXIFTAG_TYPE_DOUBLE))
-+                      tiff_ifd[ifd].newsubfiletype = int(getreal(type));
-       break;
-     case 0x0100: /* 256, ImageWidth */
-     case 0xf001: /* 61441, Fuji RAF RawImageFullWidth */
+ internal/losslessjpeg.h            | 3 ++-
+ src/decompressors/losslessjpeg.cpp | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
 
+Index: LibRaw-0.22.3/internal/losslessjpeg.h
+===================================================================
+--- LibRaw-0.22.3.orig/internal/losslessjpeg.h
++++ LibRaw-0.22.3/internal/losslessjpeg.h
+@@ -144,6 +144,7 @@ struct HuffTable
+       bool dng_bug;
+       bool disable_cache;
+       uint32_t nbits;
++      uint32_t mask;
+     std::vector<uint32_t> hufftable; // len:8 << 16| huffval:8  << 8 | shift:8
+       std::vector<uint64_t> decodecache;
+       bool initialized;
+@@ -189,7 +190,7 @@ struct HuffTable
+     uint32_t len(BitPump & pump) //bits:8, len:8, shift:8
+     {
+       uint32_t code = pump.peek(nbits);
+-      uint32_t huffdata = hufftable[code];
++      uint32_t huffdata = hufftable[code & mask];
+       uint32_t _bits = (huffdata >> 16) & 0xff;
+       pump.consume(_bits);
+       return huffdata;
+Index: LibRaw-0.22.3/src/decompressors/losslessjpeg.cpp
+===================================================================
+--- LibRaw-0.22.3.orig/src/decompressors/losslessjpeg.cpp
++++ LibRaw-0.22.3/src/decompressors/losslessjpeg.cpp
+@@ -360,6 +360,7 @@ void HuffTable::initval(uint32_t _bits[1
+                       break;
+               nbits--;
+       }
++      mask = (1U << nbits)-1;
+       hufftable.resize( size_t(1ULL << nbits));
+       uint32_t tsize = 1 << nbits;
+       for (unsigned i = 0; i < hufftable.size(); i++) hufftable[i] = 0;

++++++ libraw-CVE-2026-88387.patch -> libraw-CVE-2026-135177.patch ++++++
--- /work/SRC/openSUSE:Factory/libraw/libraw-CVE-2026-88387.patch       
2026-09-30 16:22:58.826170459 +0200
+++ /work/SRC/openSUSE:Factory/.libraw.new.1340718/libraw-CVE-2026-135177.patch 
2026-11-27 19:41:31.416019476 +0100
@@ -1,24 +1,92 @@
-From b41cbbd61951783e0440590dae55411a16185bdf Mon Sep 17 00:00:00 2001
+From 38181ab0bab4346583dbb4cf3d8c98ace8470893 Mon Sep 17 00:00:00 2001
 From: Alex Tutubalin <[email protected]>
-Date: Sat, 5 Sep 2026 09:36:40 +0300
-Subject: [PATCH] check TIFF tag type for NewSubfileType
+Date: Wed, 25 Nov 2026 11:14:03 +0300
+Subject: [PATCH] Pentax 4shot: improved IFD array analysis
 
 ---
- src/metadata/tiff.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ src/decoders/decoders_libraw.cpp | 14 ++++++++++++--
+ src/utils/open.cpp               | 28 ++++++++++++++++++----------
+ 2 files changed, 30 insertions(+), 12 deletions(-)
 
-diff --git a/src/metadata/tiff.cpp b/src/metadata/tiff.cpp
-index bad65053..e7168394 100644
---- a/src/metadata/tiff.cpp
-+++ b/src/metadata/tiff.cpp
-@@ -569,7 +569,8 @@ int LibRaw::parse_tiff_ifd(INT64 base)
-       parse_tiff_ifd(base);
+Index: LibRaw-0.22.3/src/decoders/decoders_libraw.cpp
+===================================================================
+--- LibRaw-0.22.3.orig/src/decoders/decoders_libraw.cpp
++++ LibRaw-0.22.3/src/decoders/decoders_libraw.cpp
+@@ -54,6 +54,15 @@ void LibRaw::sony_arq_load_raw()
+ 
+ void LibRaw::pentax_4shot_load_raw()
+ {
++  // check for 4 IFD present
++  int tcount = 0;
++  for (int i = 0; i < libraw_internal_data.identify_data.tiff_nifds && i < 
LIBRAW_IFD_MAXCOUNT; i++)
++    if (tiff_ifd[i].t_width == imgdata.sizes.raw_width && 
tiff_ifd[i].t_height == imgdata.sizes.raw_height &&
++        tiff_ifd[i].bps > 8 && tiff_ifd[i].samples == 1)
++      tcount++;
++  if (tcount < 4)
++        throw LIBRAW_EXCEPTION_UNSUPPORTED_FORMAT;
++  
+   size_t alloc_sz = size_t(imgdata.sizes.raw_width) * 
(size_t(imgdata.sizes.raw_height) + 16) * 4 * sizeof(ushort);
+   if (INT64(alloc_sz) > INT64(imgdata.rawparams.max_raw_memory_mb) * 
INT64(1024 * 1024))
+     throw LIBRAW_EXCEPTION_TOOBIG;
+@@ -86,6 +95,7 @@ void LibRaw::pentax_4shot_load_raw()
+       {1, 0},
+   };
+ 
++  
+   int tidx = 0;
+   for (int i = 0; i < 4; i++)
+   {
+@@ -101,12 +111,12 @@ void LibRaw::pentax_4shot_load_raw()
+       move_row = _move[i].row;
+       move_col = _move[i].col;
+     }
+-    for (; tidx < 16; tidx++)
++    for (; tidx < libraw_internal_data.identify_data.tiff_nifds && tidx < 
LIBRAW_IFD_MAXCOUNT; tidx++)
+       if (tiff_ifd[tidx].t_width == imgdata.sizes.raw_width &&
+           tiff_ifd[tidx].t_height == imgdata.sizes.raw_height &&
+           tiff_ifd[tidx].bps > 8 && tiff_ifd[tidx].samples == 1)
+         break;
+-    if (tidx >= 16)
++    if (tidx >= LIBRAW_IFD_MAXCOUNT)
        break;
-     case 0x00fe: /* NewSubfileType */
--      tiff_ifd[ifd].newsubfiletype = int(getreal(type));
-+              if((type != LIBRAW_EXIFTAG_TYPE_FLOAT) && (type != 
LIBRAW_EXIFTAG_TYPE_DOUBLE))
-+                      tiff_ifd[ifd].newsubfiletype = int(getreal(type));
-       break;
-     case 0x0100: /* 256, ImageWidth */
-     case 0xf001: /* 61441, Fuji RAF RawImageFullWidth */
-
+     imgdata.rawdata.raw_image = plane;
+     ID.input->seek(tiff_ifd[tidx].offset, SEEK_SET);
+Index: LibRaw-0.22.3/src/utils/open.cpp
+===================================================================
+--- LibRaw-0.22.3.orig/src/utils/open.cpp
++++ LibRaw-0.22.3/src/utils/open.cpp
+@@ -1093,16 +1093,24 @@ int LibRaw::open_datastream(LibRaw_abstr
+             imgdata.idata.raw_count == 4 &&
+         (imgdata.rawparams.options & LIBRAW_RAWOPTIONS_PENTAX_PS_ALLFRAMES))
+     {
+-      imgdata.idata.raw_count = 1;
+-      imgdata.idata.filters = 0;
+-      imgdata.idata.colors = 4;
+-      imgdata.sizes.top_margin+=2;
+-      imgdata.sizes.left_margin+=2;
+-      imgdata.sizes.width-=4;
+-      imgdata.sizes.height-=4;
+-      IO.mix_green = 1;
+-      pentax_component_load_raw = load_raw;
+-      load_raw = &LibRaw::pentax_4shot_load_raw;
++              int tcount = 0;
++      for (int i = 0; i < libraw_internal_data.identify_data.tiff_nifds && i 
< LIBRAW_IFD_MAXCOUNT; i++)
++        if (tiff_ifd[i].t_width == imgdata.sizes.raw_width && 
tiff_ifd[i].t_height == imgdata.sizes.raw_height &&
++            tiff_ifd[i].bps > 8 && tiff_ifd[i].samples == 1)
++          tcount++;
++        if (tcount >= 4)
++        {
++                imgdata.idata.raw_count = 1;
++                imgdata.idata.filters = 0;
++                imgdata.idata.colors = 4;
++                imgdata.sizes.top_margin += 2;
++                imgdata.sizes.left_margin += 2;
++                imgdata.sizes.width -= 4;
++                imgdata.sizes.height -= 4;
++                IO.mix_green = 1;
++                pentax_component_load_raw = load_raw;
++                load_raw = &LibRaw::pentax_4shot_load_raw;
++        }
+     }
+ 
+       if (!imgdata.idata.dng_version && makeIs(LIBRAW_CAMERAMAKER_Leaf) &&

Reply via email to