pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/libjpeg-turbo
Module Name: pkgsrc
Committed By: adam
Date: Fri Mar 27 10:48:22 UTC 2026
Modified Files:
pkgsrc/graphics/libjpeg-turbo: Makefile distinfo
pkgsrc/graphics/libjpeg-turbo/patches: patch-simd_arm__aarch32_jsimd.c
Log Message:
libjpeg-turbo: updated to 3.1.4
Significant changes relative to 3.1.3:
Fixed an issue in the TurboJPEG 2.x compatibility wrapper whereby, if a calling program attempted to decompress a lossless JPEG image using tjDecompress2() with decompression scaling, the
decompressed image was unexpectedly unscaled. This could have led to a buffer overrun if the caller allocated the packed-pixel destination buffer based on the assumption that the decompressed image
would be scaled down.
The SIMD dispatchers now use getauxval() or elf_aux_info(), if available, to detect support for Neon and AltiVec instructions on AArch32 and PowerPC Linux, Android, and *BSD systems.
Hardened the libjpeg API against hypothetical applications that may erroneously set one of the exposed quantization table values to 0 just before calling jpeg_start_compress(). (This would never
happen in a correctly-written program, because jpeg_add_quant_table() clamps all values less than 1.)
Fixed a division-by-zero error that occurred when attempting to use the jpegtran -drop option with a specially-crafted malformed drop image (specifically an image in which one or more of the
quantization table values was 0.)
Fixed an issue in the TurboJPEG API library's data destination manager that manifested as:
a memory leak that occurred if a pre-allocated JPEG destination buffer was passed to tj3Compress*() or tj3Transform(), TJPARAM_NOREALLOC was unset, and it was necessary for the library to re-allocate
the buffer to accommodate the destination image, and
a potential caller double free that occurred if pre-allocated JPEG destination buffers were passed to tj3Transform(), multiple lossless transform operations were performed, and it was necessary for
the library to re-allocate the second buffer to accommodate the second destination image.
Fixed an issue in tj3Transform() whereby, if TJPARAM_SAVEMARKERS was set to 2 or 4, TJXOPT_COPYNONE was not specified, an ICC profile was extracted from the source image, and another ICC profile was
associated with the TurboJPEG instance using tj3SetICCProfile(), both profiles were embedded in the destination image. The documented API behavior is for TJXOPT_COPYNONE to take precedence over
TJPARAM_SAVEMARKERS and for TJPARAM_SAVEMARKERS to take precedence over the associated ICC profile. Thus, tj3Transform() now ignores the associated ICC profile unless TJXOPT_COPYNONE is specified or
TJPARAM_SAVEMARKERS is set to something other than 2 or 4.
Fixed an oversight in the libjpeg API whereby, if a calling application manually set cinfo.Ss (the predictor selection value) to a value less than 1 or greater than 7 after calling
jpeg_enable_lossless() and prior to calling jpeg_start_compress(), an incorrect (all white) lossless JPEG image was silently generated.
Further hardened the TurboJPEG Java API against hypothetical applications that may erroneously pass huge values to one of the compression, YUV encoding, decompression, YUV decoding, or packed-pixel
image I/O methods, leading to signed integer overflow in the JNI wrapper's buffer size checks that rendered those checks ineffective.
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 pkgsrc/graphics/libjpeg-turbo/Makefile
cvs rdiff -u -r1.34 -r1.35 pkgsrc/graphics/libjpeg-turbo/distinfo
cvs rdiff -u -r1.3 -r1.4 \
pkgsrc/graphics/libjpeg-turbo/patches/patch-simd_arm__aarch32_jsimd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/libjpeg-turbo/Makefile
diff -u pkgsrc/graphics/libjpeg-turbo/Makefile:1.42 pkgsrc/graphics/libjpeg-turbo/Makefile:1.43
--- pkgsrc/graphics/libjpeg-turbo/Makefile:1.42 Thu Dec 11 09:39:23 2025
+++ pkgsrc/graphics/libjpeg-turbo/Makefile Fri Mar 27 10:48:22 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.42 2025/12/11 09:39:23 adam Exp $
+# $NetBSD: Makefile,v 1.43 2026/03/27 10:48:22 adam Exp $
-DISTNAME= libjpeg-turbo-3.1.3
+DISTNAME= libjpeg-turbo-3.1.4
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_GITHUB:=libjpeg-turbo/}
Index: pkgsrc/graphics/libjpeg-turbo/distinfo
diff -u pkgsrc/graphics/libjpeg-turbo/distinfo:1.34 pkgsrc/graphics/libjpeg-turbo/distinfo:1.35
--- pkgsrc/graphics/libjpeg-turbo/distinfo:1.34 Thu Dec 11 09:39:23 2025
+++ pkgsrc/graphics/libjpeg-turbo/distinfo Fri Mar 27 10:48:22 2026
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.34 2025/12/11 09:39:23 adam Exp $
+$NetBSD: distinfo,v 1.35 2026/03/27 10:48:22 adam Exp $
-BLAKE2s (libjpeg-turbo-3.1.3.tar.gz) = 223fefe2f26be34ab608d85395f61e8b218e1c2c905115554eccf5c721de8265
-SHA512 (libjpeg-turbo-3.1.3.tar.gz) = d95bf0689fb2862ad5ea9e902b73724098d911d9c312aa69157bec9de77f32e4d5ac7dfa105d844110cc66dbdb0336056ba7f96781fcbc848b72fd0661604d50
-Size (libjpeg-turbo-3.1.3.tar.gz) = 2516606 bytes
-SHA1 (patch-simd_arm__aarch32_jsimd.c) = 0d35d6f0727709d4e894202a3a297fc66383c377
+BLAKE2s (libjpeg-turbo-3.1.4.tar.gz) = 317d98df59b7f576703dbbebc32d9e0c2dbb93f75f8604d244b9b8e0ac1b3889
+SHA512 (libjpeg-turbo-3.1.4.tar.gz) = 992bd226cb645736649f802dfd8888962eff2ae8d556938fd6219dc4f409e2e3f793233b0e4328bff7b7c8ad6bf02242e2b9ac1f4d973b722becc72204035ee5
+Size (libjpeg-turbo-3.1.4.tar.gz) = 2528165 bytes
+SHA1 (patch-simd_arm__aarch32_jsimd.c) = db5ac609a3897d249e6b29f601086cce78cd7406
SHA1 (patch-simd_arm__aarch64_jsimd.c) = 76c5e81403f70a8ea8bca8ae2266066fff5ec6f9
SHA1 (patch-src_jpeglib.h) = 6be231604acd6a55f3a6d135cfaef20897e2926d
Index: pkgsrc/graphics/libjpeg-turbo/patches/patch-simd_arm__aarch32_jsimd.c
diff -u pkgsrc/graphics/libjpeg-turbo/patches/patch-simd_arm__aarch32_jsimd.c:1.3 pkgsrc/graphics/libjpeg-turbo/patches/patch-simd_arm__aarch32_jsimd.c:1.4
--- pkgsrc/graphics/libjpeg-turbo/patches/patch-simd_arm__aarch32_jsimd.c:1.3 Wed Feb 1 12:39:30 2023
+++ pkgsrc/graphics/libjpeg-turbo/patches/patch-simd_arm__aarch32_jsimd.c Fri Mar 27 10:48:22 2026
@@ -1,10 +1,10 @@
-$NetBSD: patch-simd_arm__aarch32_jsimd.c,v 1.3 2023/02/01 12:39:30 adam Exp $
+$NetBSD: patch-simd_arm__aarch32_jsimd.c,v 1.4 2026/03/27 10:48:22 adam Exp $
NetBSD support.
---- simd/arm/aarch32/jsimd.c.orig 2023-01-28 00:24:41.000000000 +0000
+--- simd/arm/aarch32/jsimd.c.orig 2026-03-26 19:34:19.000000000 +0000
+++ simd/arm/aarch32/jsimd.c
-@@ -26,6 +26,9 @@
+@@ -25,6 +25,9 @@
#include "../../jsimd.h"
#include <ctype.h>
@@ -12,19 +12,19 @@ NetBSD support.
+#include <sys/sysctl.h>
+#endif
- static THREAD_LOCAL unsigned int simd_support = ~0;
- static THREAD_LOCAL unsigned int simd_huffman = 1;
-@@ -105,6 +108,9 @@ init_simd(void)
- #endif
- #if !defined(__ARM_NEON__) && (defined(__linux__) || defined(ANDROID) || defined(__ANDROID__))
+ #if !defined(__ARM_NEON__) && \
+ (defined(HAVE_GETAUXVAL) || defined(HAVE_ELF_AUX_INFO))
+@@ -113,6 +116,9 @@ init_simd(void)
+ unsigned long cpufeatures = 0;
+ #elif defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
int bufsize = 1024; /* an initial guess for the line buffer size limit */
+#elif defined(__NetBSD__)
+ int neon_present;
+ size_t len;
#endif
+ #endif
- if (simd_support != ~0U)
-@@ -123,6 +129,10 @@ init_simd(void)
+@@ -136,6 +142,10 @@ init_simd(void)
if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT)
break;
}
@@ -32,6 +32,6 @@ NetBSD support.
+ if (sysctlbyname("machdep.neon_present", &neon_present, &len, NULL, 0) == 0
+ && neon_present != 0)
+ simd_support |= JSIMD_NEON;
- #endif
-
- #ifndef NO_GETENV
+ #elif defined(HAVE_ELF_AUX_INFO)
+ elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures));
+ if (cpufeatures & HWCAP_NEON)
Home |
Main Index |
Thread Index |
Old Index