No description
Find a file
Ken Sharp cac551e014 JPX decoder - fix use with PassThrough and errors
OSS-fuzz #475335810

The problem here is to do with the disjointed way we have to work when
using the OpenJPEG JPX decoder. We send a spec_op to the device to say
that we've opened a filter, then we pass the data along, then (normally)
we send a 'end' spec_op. Finally, when the filter is closed, we send
a 'NULL'.

All of this is done using a supplied interpreter level function.

The problem here is that we abort the JPX decoding without ever
sending any data. This means we leave the device with the flag set to
expect JPX data.

We then get a totally different image, which is not JPX encodded, and
because the flag is set we start up the JPX writer when we receive data.

But because the image data isn't JPX encoded, we never hit the end of
data so we never send the spec_op to terminate it.

(this is what I mean by the usage being disjointed).

In this commit, when releasing the JPX filter just terminate the JPX
PassThrough, even if we haven't ever sent any data.

I also checked the DCT decoder; that works differently (better) and is
not affected in the same way.
2026-01-15 15:20:29 +00:00
arch Add missing ARCH_ALIGN_UINT64_T_MOD for MacOS. 2025-07-15 08:59:56 +01:00
base JPX decoder - fix use with PassThrough and errors 2026-01-15 15:20:29 +00:00
brotli Add Brotli encode/decode filters. 2025-02-28 12:24:33 +00:00
contrib Fix opvp device 2026-01-05 14:42:01 +00:00
cups Tweak gdevcups.c printf workaround 2023-06-19 07:42:18 +01:00
demos Check all allocations for integer overflow 2025-07-14 15:52:34 +01:00
devices Bug 709030: Fix detection of simple font with well known encodings 2026-01-15 10:27:58 +00:00
doc Update libpng to 1.6.51 2025-11-24 17:04:47 +00:00
examples Update postal address in file headers 2023-04-04 15:40:22 +01:00
expat Fix eXpat building for older Visual Studio versions (2005/2008) 2025-03-12 08:03:19 +00:00
freetype Fix building with clang 2025-04-23 08:50:48 +01:00
gpdl Check all allocations for integer overflow 2025-07-14 15:52:34 +01:00
iccprofiles Bug 691732 Add support for e-sRGB and ROMMRGB color spaces 2019-01-07 20:54:41 -08:00
ijs Bug 706084: IJS - Update the autoconf/automake derived files. 2022-11-21 08:38:05 +00:00
ios Bug 708575: Alignment issues on WASM32 2025-07-11 15:45:43 +01:00
jbig2dec Ensure that pointer that is never used is not initialized to out of bounds value. 2025-08-19 16:53:08 +02:00
jpeg Update libjpeg to 9f. 2024-10-16 15:38:12 +01:00
jpegxr Fix compile failure due to missing header. 2020-09-22 18:00:45 +01:00
lcms2mt Bug 708575: Alignment issues on WASM32 2025-07-11 15:45:43 +01:00
lib Remove selectdevice 2025-07-25 15:41:35 +01:00
libpng Update libpng to 1.6.51 2025-11-24 17:04:47 +00:00
man Man page changes 2025-04-12 14:16:38 +01:00
openjpeg Update OpenJPEG to 2.5.4 2025-09-23 14:37:17 +02:00
pcl Address C23 compliant compiler warnings 2025-12-04 13:57:23 +00:00
pdf Bug 709017: Tweak pdfi for Default colorspaces in softmasks. 2026-01-12 18:03:08 +00:00
psi Remove FORCE_ASSERT_CHECKING and DEBUG_TRACE_PS_OPERATORS defines 2025-12-10 16:00:41 +00:00
Resource PS interpreter - give a more helpful error on TBCP selection from PJL 2025-09-22 15:57:55 +01:00
tiff Import libtiff 4.7.0 2024-10-15 16:59:33 +01:00
toolbin Remove selectdevice 2025-07-25 15:41:35 +01:00
urf PostScript interpreter - wholesale removal of filters 2025-02-28 08:56:42 +00:00
windows Add Brotli encode/decode filters. 2025-02-28 12:24:33 +00:00
xps XPS interpreter - check some TIFF values 2025-09-09 10:12:31 +01:00
zlib Update zlib to 1.3.1 2024-10-16 15:38:12 +01:00
.gitattributes Tweak to ignore whitespace issues in new docs sources 2022-09-20 15:37:37 +01:00
.gitignore This is the squash of the sphinx-docs branch 2022-09-20 15:37:37 +01:00
.lgtm.yml lgtm.com: configuration file fixes. 2020-05-11 15:41:47 +01:00
.readthedocs.yaml This is the squash of the sphinx-docs branch 2022-09-20 15:37:37 +01:00
autogen.sh Bug 705469: Honour NOCONFIGURE in autogen.sh 2022-06-15 08:11:28 +01:00
configure.ac Bug 708832: Make brotli work with both local source and share libs 2025-09-12 16:04:47 +01:00
DroidSansFallback.NOTICE Commit of build_consolidation branch 2015-07-20 18:21:17 +01:00
LICENSE Remove references for ETS related patents 2021-04-28 15:34:41 +01:00
Makefile.in Bug 708832: Make brotli work with both local source and share libs 2025-09-12 16:04:47 +01:00