* Sat Sep 28 2024 dmueller@suse.com
- update to 3.0.4:
* Fixed an issue whereby the CPU usage of the default marker
processor in the decompressor grew exponentially with the
number of markers. This caused an unreasonable slow-down in
`jpeg_read_header()` if an application called `jpeg_save_markers()`
to save markers of a particular type and then attempted to
decompress a JPEG image containing an excessive number of markers
of that type.
* Hardened the default marker processor in the decompressor to guard
against an issue (exposed by 3.0 beta2[6]) whereby attempting to
decompress a specially-crafted malformed JPEG image (specifically
an image with a complete 12-bit-per-sample Start Of Frame segment
followed by an incomplete 8-bit-per-sample Start Of Frame segment)
using buffered-image mode and input prefetching caused a segfault
if the `fill_input_buffer()` method in the calling application's
custom source manager incorrectly returned `FALSE` in response to a
prematurely-terminated JPEG data stream.
* Fixed an issue in cjpeg whereby, when generating a
12-bit-per-sample or 16-bit-per-sample lossless JPEG image,
specifying a point transform value greater than 7 resulted in an
error ("Invalid progressive/lossless parameters") unless the
`-precision` option was specified before the `-lossless` option.
* Fixed a regression introduced by 3.0.3[3] that made it impossible
for calling applications to generate 12-bit-per-sample
arithmetic-coded lossy JPEG images using the TurboJPEG API.
* Fixed an error ("Destination buffer is not large enough") that
occurred when attempting to generate a full-color lossless JPEG
image using the TurboJPEG Java API's `byte[]
TJCompressor.compress()` method if the value of `TJ.PARAM_SUBSAMP`
was not `TJ.SAMP_444`.
* Fixed a segfault in djpeg that occurred if a negative width was
specified with the `-crop` option. Since the cropping region width
was read into an unsigned 32-bit integer, a negative width was
interpreted as a very large value. With certain negative width and
positive left boundary values, the bounds checks in djpeg and
`jpeg_crop_scanline()` overflowed and did not detect the
out-of-bounds width, which caused a buffer overrun in the
upsampling or color conversion routine. Both bounds checks now use
64-bit integers to guard against overflow, and djpeg now checks for
negative numbers when it parses the crop specification from the
command line.
* Fixed an issue whereby the TurboJPEG lossless transformation
function and methods checked the specified cropping region against
the source image dimensions and level of chrominance subsampling
rather than the destination image dimensions and level of
chrominance subsampling, which caused some cropping regions to be
unduly rejected when performing 90-degree rotation, 270-degree
rotation, transposition, transverse transposition, or grayscale
conversion.
* Fixed an issue whereby the TurboJPEG lossless transformation
function and methods did not honor
`TJXOPT_COPYNONE`/`TJTransform.OPT_COPYNONE` unless it was
specified for all lossless transforms.
* Sat Aug 31 2024 dmueller@suse.com
- update to 3.0.3:
* The x86-64 SIMD extensions now include support for Intel
Control-flow Enforcement Technology (CET), which is enabled
automatically if CET is enabled in the C compiler.
* Fixed a regression introduced by 3.0 beta2[6] that made it
impossible for calling applications to supply custom Huffman
tables when generating 12-bit-per-component lossy JPEG images
using the libjpeg API.
* Fixed a segfault that occurred when attempting to use the
jpegtran `-drop` option with a specially-crafted malformed
input image or drop image (specifically an image in which all
of the scans contain fewer components than the number of
components specified in the Start Of Frame segment.)
* Mon Feb 05 2024 mardnh@gmx.de
- Update to version 3.0.2
* Fixed a signed integer overflow in the tj3CompressFromYUV8(),
tj3DecodeYUV8(), tj3DecompressToYUV8(), and tj3EncodeYUV8()
functions, detected by the Clang and GCC undefined behavior
sanitizers, that could be triggered by setting the align
parameter to an unreasonably large value. This issue did not
pose a security threat, but removing the warning made it
easier to detect actual security issues, should they arise in
the future.
* Introduced a new parameter (TJPARAM_MAXMEMORY in the
TurboJPEG C API and TJ.PARAM_MAXMEMORY in the TurboJPEG Java
API) and a corresponding TJBench option (-maxmemory) for
specifying the maximum amount of memory (in megabytes) that
will be allocated for intermediate buffers, which are used
with progressive JPEG compression and decompression, optimized
baseline entropy coding, lossless JPEG compression, and
lossless transformation. The new parameter and option serve
the same purpose as the max_memory_to_use field in the
jpeg_memory_mgr struct in the libjpeg API, the JPEGMEM
environment variable, and the cjpeg/djpeg/jpegtran -maxmemory
option.
* Introduced a new parameter (TJPARAM_MAXPIXELS in the TurboJPEG
C API and TJ.PARAM_MAXPIXELS in the TurboJPEG Java API) and a
corresponding TJBench option (-maxpixels) for specifying the
maximum number of pixels that the decompression, lossless
transformation, and packed-pixel image loading
functions/methods will process.
* Fixed an error ("Unsupported color conversion request") that
occurred when attempting to decompress a 3-component lossless
JPEG image without an Adobe APP14 marker. The decompressor
now assumes that a 3-component lossless JPEG image without an
Adobe APP14 marker uses the RGB colorspace if its component
IDs are 1, 2, and 3.
* Mon Jan 15 2024 schwab@suse.de
- Do not require SIMD support when it does not exist
* Mon Jan 01 2024 dmueller@suse.com
- update to 3.0.1 (bsc#1211542, CVE-2023-2804):
* The x86-64 SIMD functions now use a standard stack frame,
prologue, and epilogue so that debuggers and profilers can
reliably capture backtraces from within the functions.
* Fixed two minor issues in the interblock smoothing algorithm
that caused mathematical (but not necessarily perceptible)
edge block errors when decompressing progressive JPEG images
exactly two MCU blocks in width or that use vertical
chrominance subsampling.
* The TurboJPEG API now supports 4:4:1 (transposed 4:1:1)
chrominance subsampling, which allows losslessly transposed or
rotated 4:1:1 JPEG images to be losslessly cropped, partially
decompressed, or decompressed to planar YUV images.
* Fixed various segfaults and buffer overruns (CVE-2023-2804)
* that occurred when attempting to decompress various
specially-crafted malformed 12-bit-per-component and
16-bit-per-component lossless JPEG images using color
quantization or merged chroma upsampling/color conversion. The
underlying cause of these issues was that the color
quantization and merged chroma upsampling/color conversion
algorithms were not designed with lossless decompression
in mind. Since libjpeg-turbo explicitly does not support color
conversion when compressing or decompressing lossless JPEG
images, merged chroma upsampling/color conversion never should
have been enabled for such images. Color quantization is a
legacy feature that serves little or no purpose with lossless
JPEG images, so it is also now disabled when decompressing such
images. (As a result, djpeg can no longer decompress a
lossless JPEG image into a GIF image.)
* Fixed an oversight in 1.4 beta1[8] that caused various
segfaults and buffer overruns when attempting to decompress
various specially-crafted malformed 12-bit-per-component JPEG
images using djpeg with both color quantization and RGB565
color conversion enabled.
* Fixed an issue whereby `jpeg_crop_scanline()` sometimes
miscalculated the downsampled width for components with 4x2 or
2x4 subsampling factors if decompression scaling was enabled.
This caused the components to be upsampled incompletely, which
caused the color converter to read from uninitialized memory.
With 12-bit data precision, this caused a buffer overrun or
underrun and subsequent segfault if the sample value read from
uninitialized memory was outside of the valid sample range.
* Fixed a long-standing issue whereby the `tj3Transform()`
function, when used with the `TJXOP_TRANSPOSE`,
`TJXOP_TRANSVERSE`, `TJXOP_ROT90`, or `TJXOP_ROT270` transform
operation and without automatic JPEG destination buffer
(re)allocation or lossless cropping, computed the worst-case
transformed JPEG image size based on the source image
dimensions rather than the transformed image dimensions. If a
calling program allocated the JPEG destination buffer based on
the transformed image dimensions, as the API documentation
instructs, and attempted to transform a specially-crafted
4:2:2, 4:4:0, 4:1:1, or 4:4:1 JPEG source image containing a
large amount of metadata, the issue caused `tj3Transform()` to
overflow the JPEG destination buffer rather than fail
gracefully. The issue could be worked around by setting
`TJXOPT_COPYNONE`. Note that, irrespective of this issue,
`tj3Transform()` cannot reliably transform JPEG source images
that contain a large amount of metadata unless automatic JPEG
destination buffer (re)allocation is used or `TJXOPT_COPYNONE`
is set.
* Significantly sped up the computation of optimal Huffman
tables. This speeds up the compression of tiny images by as
much as 2x and provides a noticeable speedup for images as
large as 256x256 when using optimal Huffman tables.
* All deprecated fields, constructors, and methods in the
TurboJPEG Java API have been removed.
* Arithmetic entropy coding is now supported with
12-bit-per-component JPEG images.
* Overhauled the TurboJPEG API to address long-standing
limitations and to make the API more extensible and intuitive.
* Fri Jun 23 2023 pgajdos@suse.com
- merge two spec files into one
* Thu May 04 2023 dimstar@opensuse.org
- Add _multibuild to define 2nd spec file as additional flavor.
Eliminates the need for source package links in OBS.
* Wed Mar 08 2023 mpluskal@suse.com
- Build AVX2 enabled hwcaps library for x86_64-v3
* Tue Feb 21 2023 info@paolostivanin.com
- update to 2.1.5.1:
* Fixed a regression introduced by 2.0 beta1[15] that caused a buffer
overrun in the progressive Huffman encoder when attempting to transform
a specially-crafted malformed 12-bit-per-component JPEG image into a
progressive 12-bit-per-component JPEG image using a 12-bit-per-component
build of libjpeg-turbo.
* Fixed an issue whereby, when using a 12-bit-per-component build of
libjpeg-turbo (-DWITH_12BIT=1), passing samples with values greater than 4095
or less than 0 to jpeg_write_scanlines() caused a buffer overrun or
underrun in the RGB-to-YCbCr color converter.
* Fixed a floating point exception that occurred when attempting to use
the jpegtran -drop and -trim options to losslessly transform a
specially-crafted malformed JPEG image.
* Fixed an issue in tjBufSizeYUV2() whereby it returned a bogus result,
rather than throwing an error, if the align parameter was not a power of 2.
* Fixed a similar issue in tjCompressFromYUV() whereby it generated a corrupt
JPEG image in certain cases, rather than throwing an error,
if the align parameter was not a power of 2.
* Fixed an issue whereby tjDecompressToYUV2(), which is a wrapper for
tjDecompressToYUVPlanes(), used the desired YUV image dimensions
rather than the actual scaled image dimensions when computing the plane
pointers and strides to pass to tjDecompressToYUVPlanes().
This caused a buffer overrun and subsequent segfault if the desired
image dimensions exceeded the scaled image dimensions.
* Fixed an issue whereby, when decompressing a 12-bit-per-component JPEG
image (-DWITH_12BIT=1) using an alpha-enabled output color space such as
JCS_EXT_RGBA, the alpha channel was set to 255 rather than 4095.
* Fixed an issue whereby the Java version of TJBench did not accept a range
of quality values.
* Fixed an issue whereby, when -progressive was passed to TJBench,
the JPEG input image was not transformed into a progressive JPEG image
prior to decompression.
* Sat Dec 24 2022 opensuse@dstoecker.de
- Add explicit provides for jpegtran, so it can be installed easier
Version: 1.5.3-5.7.1
* Wed Mar 13 2019 pgajdos@suse.com
- security update
- added patches
CVE-2018-14498 [bsc#1128712]
+ libjpeg-turbo-CVE-2018-14498.patch
* Mon Dec 03 2018 pgajdos@suse.com
- asan_build: build ASAN included
- debug_build: build more suitable for debugging
- disable silent rules
* Tue Jun 19 2018 pgajdos@suse.com
- security update:
* CVE-2018-1152 [bsc#1098155]
+ libjpeg-turbo-CVE-2018-1152.patch
* Tue Jun 12 2018 pgajdos@suse.com
- security update:
* CVE-2018-11813 [bsc#1096209]
+ libjpeg-turbo-CVE-2018-11813.patch
* remove redundant libjpeg-turbo-CVE-2017-15232.patch
[bsc#1062937#c17]
* Mon Dec 18 2017 pgajdos@suse.com
- - update to version 1.5.3
1. Fixed a NullPointerException in the TurboJPEG Java wrapper that occurred
when using the YUVImage constructor that creates an instance backed by separate
image planes and allocates memory for the image planes.
2. Fixed an issue whereby the Java version of TJUnitTest would fail when
testing BufferedImage encoding/decoding on big endian systems.
3. Fixed a segfault in djpeg that would occur if an output format other than
PPM/PGM was selected along with the `-crop` option. The `-crop` option now
works with the GIF and Targa formats as well (unfortunately, it cannot be made
to work with the BMP and RLE formats due to the fact that those output engines
write scanlines in bottom-up order.) djpeg will now exit gracefully if an
output format other than PPM/PGM, GIF, or Targa is selected along with the
`-crop` option.
4. Fixed an issue whereby `jpeg_skip_scanlines()` would segfault if color
quantization was enabled.
5. TJBench (both C and Java versions) will now display usage information if any
command-line argument is unrecognized. This prevents the program from silently
ignoring typos.
6. Fixed an access violation in tjbench.exe (Windows) that occurred when the
program was used to decompress an existing JPEG image.
7. Fixed an ArrayIndexOutOfBoundsException in the TJExample Java program that
occurred when attempting to decompress a JPEG image that had been compressed
with 4:1:1 chrominance subsampling.
8. Fixed an issue whereby, when using `jpeg_skip_scanlines()` to skip to the
end of a single-scan (non-progressive) image, subsequent calls to
`jpeg_consume_input()` would return `JPEG_SUSPENDED` rather than
`JPEG_REACHED_EOI`.
9. `jpeg_crop_scanlines()` now works correctly when decompressing grayscale
JPEG images that were compressed with a sampling factor other than 1 (for
instance, with `cjpeg -grayscale -sample 2x2`).
* Thu Oct 12 2017 pgajdos@suse.com
- security update:
* CVE-2017-15232 [bsc#1062937]
+ libjpeg-turbo-CVE-2017-15232.patch
* Thu Oct 12 2017 pgajdos@suse.com
- Update to version 1.5.2
+ Fixed several memory leaks in the TurboJPEG API library that
could occur if the library was built with certain compilers
and optimization levels.
+ The libjpeg-turbo memory manager will now honor the
max_memory_to_use structure member in jpeg_memory_mgr,
which can be set to the maximum amount of memory (in bytes)
that libjpeg-turbo should use during decompression or
multi-pass (including progressive) compression. This limit
can also be set using the JPEGMEM environment variable or
using the -maxmemory switch in cjpeg/djpeg/jpegtran.
+ TJBench will now run each benchmark for 1 second prior to
starting the timer, in order to improve the consistency of
the results. Furthermore, the -warmup option is now used to
specify the amount of warmup time rather than the number of
warmup iterations.
+ Fixed an error (short jump is out of range) that occurred
when assembling the 32-bit x86 SIMD extensions with NASM
versions prior to 2.04.
+ Fixed a regression introduced by 1.5 beta1[11] that prevented
the Java version of TJBench from outputting any reference images
(the -nowrite switch was accidentally enabled by default.)
libjpeg-turbo should now build and run with full AltiVec SIMD
acceleration on PowerPC-based AmigaOS 4 and OpenBSD systems.
* Wed Jan 18 2017 bwiedemann@suse.com
- set build date to enable reproducible builds
* Wed Sep 21 2016 idonmez@suse.com
- Update to version 1.5.1 fate#324061
+ Fix for PowerPC platforms lacking AltiVec instructions
+ Fix ABI problem with clang/llvm on aarch64.
+ Fancy upsampling is now supported when decompressing JPEG
images that use 4:4:0 (h1v2) chroma subsampling.
+ If merged upsampling isn't SIMD-accelerated but YCbCr-to-RGB
conversion is, then libjpeg-turbo will now disable merged
upsampling when decompressing YCbCr JPEG images into RGB
or extended RGB output images. This significantly speeds up
the decompression of 4:2:0 and 4:2:2 JPEGs on ARM platforms
if fancy upsampling is not used
(for example, if the -nosmooth option to djpeg is specified.)
+ The TurboJPEG API will now decompress 4:2:2 and 4:4:0 JPEG
images with 2x2 luminance sampling factors and 2x1 or 1x2
chrominance sampling factors.
+ Fixed an unsigned integer overflow in the libjpeg memory manager.
+ Fixed additional negative left shifts and other issues reported
by the GCC and Clang undefined behavior sanitizers when
attempting to decompress specially-crafted malformed JPEG
images. None of these issues posed a security threat, but
removing the warnings makes it easier to detect actual
security issues, should they arise in the future.
+ Fixed an out-of-bounds array reference, introduced by
1.4.902 and detected by the Clang undefined behavior sanitizer,
that could be triggered by a specially-crafted malformed
JPEG image with more than four components. Because the
out-of-bounds reference was still within the same structure,
it was not known to pose a security threat, but removing
the warning makes it easier to detect actual security issues,
should they arise in the future.
* Wed Jun 08 2016 idonmez@suse.com
- Update to version 1.5.0
+ Fixed an issue whereby a malformed motion-JPEG frame could
cause the "fast path" of libjpeg-turbo's Huffman decoder to
read from uninitialized memory.
+ Added libjpeg-turbo version and build information to the global
string table of the libjpeg and TurboJPEG API libraries.
+ Fixed a couple of issues in the PPM reader that would cause
buffer overruns in cjpeg if one of the values in a binary
PPM/PGM input file exceeded the maximum value defined in the
file's header. libjpeg-turbo 1.4.2 already included a similar
fix for ASCII PPM/PGM files. Note that these issues were not
security bugs, since they were confined to the cjpeg program
and did not affect any of the libjpeg-turbo libraries.
+ Fixed an issue whereby attempting to decompress a JPEG file with
a corrupt header using the tjDecompressToYUV2() function would
cause the function to abort without returning an error and,
under certain circumstances, corrupt the stack. This only
occurred if tjDecompressToYUV2() was called prior to calling
tjDecompressHeader3(), or if the return value from
tjDecompressHeader3() was ignored (both cases represent
incorrect usage of the TurboJPEG API.)
+ The jpeg_stdio_src(), jpeg_mem_src(), jpeg_stdio_dest(),
and jpeg_mem_dest() functions in the libjpeg API will now
throw an error if a source/destination manager has already
been assigned to the compress or decompress object by a
different function or by the calling program.
* Thu Oct 08 2015 idonmez@suse.com
- Update to version 1.4.2
+ Crash fixes
+ clang compatibility fixes
+ See the included ChangeLog.txt for the details
- Drop libjpeg-turbo-1.4.0-int32.patch, not needed anymore.
- Drop libjpeg-turbo-remove-test.patch, fixed upstream.
* Thu Mar 05 2015 jengelh@inai.de
- Remove useless same-name provides. Use download URLs not
dependent on directory structure.
* Mon Mar 02 2015 normand@linux.vnet.ibm.com
- Remove float tests with new libjpeg-turbo-remove-test.patch
same as Fedora bug 1161585 related to upstream issue
https://sourceforge.net/p/libjpeg-turbo/bugs/83/
* Sat Jan 10 2015 p.drouand@gmail.com
- Update to version 1.4.0
+ Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build
because OS X does not provide the le32toh() and htole32() functions.)
+ The non-SIMD RGB565 color conversion code did not work correctly on big
endian machines. This has been fixed.
+ Fixed an issue in tjPlaneSizeYUV() whereby it would erroneously return 1
instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY.
+ Fixed an issue in tjBufSizeYUV2() wherby it would erroneously return 0
instead of -1 if width was < 1.
+ The Huffman encoder now uses clz and bsr instructions for bit counting on
ARM64 platforms (see 1.4 beta1 [5].)
+ The close() method in the TJCompressor and TJDecompressor Java classes is
now idempotent. Previously, that method would call the native tjDestroy()
function even if the TurboJPEG instance had already been destroyed. This
caused an exception to be thrown during finalization, if the close() method had
already been called. The exception was caught, but it was still an expensive
operation.
+ The TurboJPEG API previously generated an error ("Could not determine
subsampling type for JPEG image") when attempting to decompress grayscale JPEG
images that were compressed with a sampling factor other than 1 (for instance,
with 'cjpeg -grayscale -sample 2x2'). Subsampling technically has no meaning
with grayscale JPEGs, and thus the horizontal and vertical sampling factors
for such images are ignored by the decompressor. However, the TurboJPEG API
was being too rigid and was expecting the sampling factors to be equal to 1
before it treated the image as a grayscale JPEG.
+ cjpeg, djpeg, and jpegtran now accept an argument of -version, which will
print the library version and exit.
+ Referring to 1.4 beta1 [15], another extremely rare circumstance was
discovered under which the Huffman encoder's local buffer can be overrun
when a buffered destination manager is being used and an
extremely-high-frequency block (basically junk image data) is being encoded.
Even though the Huffman local buffer was increased from 128 bytes to 136 bytes
to address the previous issue, the new issue caused even the larger buffer to
be overrun. Further analysis reveals that, in the absolute worst case (such as
setting alternating AC coefficients to 32767 and -32768 in the JPEG scanning
order), the Huffman encoder can produce encoded blocks that approach double the
size of the unencoded blocks. Thus, the Huffman local buffer was increased to
256 bytes, which should prevent any such issue from re-occurring in the future.
+ The new tjPlaneSizeYUV(), tjPlaneWidth(), and tjPlaneHeight() functions
were not actually usable on any platform except OS X and Windows, because
those functions were not included in the libturbojpeg mapfile. This has been
fixed.
+ Restored the JPP(), JMETHOD(), and FAR macros in the libjpeg-turbo header
files. The JPP() and JMETHOD() macros were originally implemented in libjpeg
as a way of supporting non-ANSI compilers that lacked support for prototype
parameters. libjpeg-turbo has never supported such compilers, but some
software packages still use the macros to define their own prototypes.
Similarly, libjpeg-turbo has never supported MS-DOS and other platforms that
have far symbols, but some software packages still use the FAR macro. A pretty
good argument can be made that this is a bad practice on the part of the
software in question, but since this affects more than one package, it's just
easier to fix it here.
+ Fixed issues that were preventing the ARM 64-bit SIMD code from compiling
for iOS, and included an ARMv8 architecture in all of the binaries installed by
the "official" libjpeg-turbo SDK for OS X.
- Adapt patches to upstream changes
libjpeg-ocloexec.patch > libjpeg-1.4.0-ocloexec.patch
libjpeg-turbo-1.3.0-int32.patch > libjpeg-turbo-1.4.0-int32.patch
- Remove libjpeg-turbo-CVE-2014-9092.patch; fixed on upstream release
- Bump tminor to 1
* Thu Nov 27 2014 pgajdos@suse.com
- security update CVE-2014-9092 [bnc#906761]
* added libjpeg-turbo-CVE-2014-9092.patch
* Wed Oct 15 2014 olaf@aepfle.de
- Obsolete jpeg version 6b, 8.0.1 and 8.0.2 to avoid conflicts
during zypper dup
* Mon Mar 31 2014 pgajdos@suse.com
- update to 1.3.1:
* Fixed a bug whereby attempting to encode a progressive JPEG
with arithmetic entropy coding (by passing arguments of
- progressive -arithmetic to cjpeg or jpegtran, for instance)
would result in an error, "Requested feature was omitted at
compile time".
* Fixed a couple of issues whereby malformed JPEG images would
cause libjpeg-turbo to use uninitialized memory during
decompression.
* Fixed an error ("Buffer passed to JPEG library is too small")
that occurred when calling the TurboJPEG YUV encoding function
with a very small (< 5x5) source image, and added a unit test
to check for this error.
* etc. see ChangeLog.txt
* Thu Feb 20 2014 tchvatal@suse.com
- Provide right name for turbo library 32bit generating.
* Fri Feb 07 2014 tchvatal@suse.com
- Require libturbojpeg in the devel package.
Otherwise we just have dangling symlink there.
* Tue Sep 10 2013 pgajdos@suse.com
- update do 1.3.0:
* Fixed a Huffman encoder bug that prevented I/O suspension from
working properly.
* Added support for additional scaling factors (3/8, 5/8, 3/4,
7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2) when
decompressing. Note that the IDCT will not be SIMD-accelerated
when using any of these new scaling factors.
* The tjDecompressToYUV() function now supports the TJFLAG_FASTDCT
flag.
* cjpeg can now be used to generate JPEG files with the RGB
colorspace (feature ported from jpeg-8d.)
* etc. see ChangeLog.txt