Compare commits
No commits in common. "c10s" and "c8s" have entirely different histories.
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/libpng-1.6.34.tar.xz
|
||||
@ -1 +0,0 @@
|
||||
mingw-libpng package is retired on branch c10s for BAKERY-412
|
||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
||||
69
libpng-1.6-CVE-2025-64720.patch
Normal file
69
libpng-1.6-CVE-2025-64720.patch
Normal file
@ -0,0 +1,69 @@
|
||||
diff --git a/pngrtran.c b/pngrtran.c
|
||||
index 548780030a..2f52022551 100644
|
||||
--- a/pngrtran.c
|
||||
+++ b/pngrtran.c
|
||||
@@ -1781,19 +1781,51 @@ png_init_read_transformations(png_structrp png_ptr)
|
||||
}
|
||||
else /* if (png_ptr->trans_alpha[i] != 0xff) */
|
||||
{
|
||||
- png_byte v, w;
|
||||
-
|
||||
- v = png_ptr->gamma_to_1[palette[i].red];
|
||||
- png_composite(w, v, png_ptr->trans_alpha[i], back_1.red);
|
||||
- palette[i].red = png_ptr->gamma_from_1[w];
|
||||
-
|
||||
- v = png_ptr->gamma_to_1[palette[i].green];
|
||||
- png_composite(w, v, png_ptr->trans_alpha[i], back_1.green);
|
||||
- palette[i].green = png_ptr->gamma_from_1[w];
|
||||
-
|
||||
- v = png_ptr->gamma_to_1[palette[i].blue];
|
||||
- png_composite(w, v, png_ptr->trans_alpha[i], back_1.blue);
|
||||
- palette[i].blue = png_ptr->gamma_from_1[w];
|
||||
+ if ((png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0)
|
||||
+ {
|
||||
+ /* Premultiply only:
|
||||
+ * component = round((component * alpha) / 255)
|
||||
+ */
|
||||
+ png_uint_32 component;
|
||||
+
|
||||
+ component = png_ptr->gamma_to_1[palette[i].red];
|
||||
+ component =
|
||||
+ (component * png_ptr->trans_alpha[i] + 128) / 255;
|
||||
+ palette[i].red = png_ptr->gamma_from_1[component];
|
||||
+
|
||||
+ component = png_ptr->gamma_to_1[palette[i].green];
|
||||
+ component =
|
||||
+ (component * png_ptr->trans_alpha[i] + 128) / 255;
|
||||
+ palette[i].green = png_ptr->gamma_from_1[component];
|
||||
+
|
||||
+ component = png_ptr->gamma_to_1[palette[i].blue];
|
||||
+ component =
|
||||
+ (component * png_ptr->trans_alpha[i] + 128) / 255;
|
||||
+ palette[i].blue = png_ptr->gamma_from_1[component];
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Composite with background color:
|
||||
+ * component =
|
||||
+ * alpha * component + (1 - alpha) * background
|
||||
+ */
|
||||
+ png_byte v, w;
|
||||
+
|
||||
+ v = png_ptr->gamma_to_1[palette[i].red];
|
||||
+ png_composite(w, v,
|
||||
+ png_ptr->trans_alpha[i], back_1.red);
|
||||
+ palette[i].red = png_ptr->gamma_from_1[w];
|
||||
+
|
||||
+ v = png_ptr->gamma_to_1[palette[i].green];
|
||||
+ png_composite(w, v,
|
||||
+ png_ptr->trans_alpha[i], back_1.green);
|
||||
+ palette[i].green = png_ptr->gamma_from_1[w];
|
||||
+
|
||||
+ v = png_ptr->gamma_to_1[palette[i].blue];
|
||||
+ png_composite(w, v,
|
||||
+ png_ptr->trans_alpha[i], back_1.blue);
|
||||
+ palette[i].blue = png_ptr->gamma_from_1[w];
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else
|
||||
25
libpng-1.6-CVE-2025-65018_p1of2.patch
Normal file
25
libpng-1.6-CVE-2025-65018_p1of2.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/pngread.c b/pngread.c
|
||||
index 212afb7d21..92571ec335 100644
|
||||
--- a/pngread.c
|
||||
+++ b/pngread.c
|
||||
@@ -4040,6 +4040,20 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
|
||||
int result;
|
||||
png_image_read_control display;
|
||||
|
||||
+ /* Reject bit depth mismatches to avoid buffer overflows. */
|
||||
+ png_uint_32 ihdr_bit_depth =
|
||||
+ image->opaque->png_ptr->bit_depth;
|
||||
+ int requested_linear =
|
||||
+ (image->format & PNG_FORMAT_FLAG_LINEAR) != 0;
|
||||
+ if (ihdr_bit_depth == 16 && !requested_linear)
|
||||
+ return png_image_error(image,
|
||||
+ "png_image_finish_read: "
|
||||
+ "16-bit PNG must use 16-bit output format");
|
||||
+ if (ihdr_bit_depth < 16 && requested_linear)
|
||||
+ return png_image_error(image,
|
||||
+ "png_image_finish_read: "
|
||||
+ "8-bit PNG must not use 16-bit output format");
|
||||
+
|
||||
memset(&display, 0, (sizeof display));
|
||||
display.image = image;
|
||||
display.buffer = buffer;
|
||||
130
libpng-1.6-CVE-2025-65018_p2of2.patch
Normal file
130
libpng-1.6-CVE-2025-65018_p2of2.patch
Normal file
@ -0,0 +1,130 @@
|
||||
diff --git a/pngread.c b/pngread.c
|
||||
index 92571ec335..79917daaaf 100644
|
||||
--- a/pngread.c
|
||||
+++ b/pngread.c
|
||||
@@ -3129,6 +3129,54 @@ png_image_read_colormapped(png_voidp argument)
|
||||
}
|
||||
}
|
||||
|
||||
+/* Row reading for interlaced 16-to-8 bit depth conversion with local buffer. */
|
||||
+static int
|
||||
+png_image_read_direct_scaled(png_voidp argument)
|
||||
+{
|
||||
+ png_image_read_control *display = png_voidcast(png_image_read_control*,
|
||||
+ argument);
|
||||
+ png_imagep image = display->image;
|
||||
+ png_structrp png_ptr = image->opaque->png_ptr;
|
||||
+ png_bytep local_row = png_voidcast(png_bytep, display->local_row);
|
||||
+ png_bytep first_row = png_voidcast(png_bytep, display->first_row);
|
||||
+ ptrdiff_t row_bytes = display->row_bytes;
|
||||
+ int passes;
|
||||
+
|
||||
+ /* Handle interlacing. */
|
||||
+ switch (png_ptr->interlaced)
|
||||
+ {
|
||||
+ case PNG_INTERLACE_NONE:
|
||||
+ passes = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case PNG_INTERLACE_ADAM7:
|
||||
+ passes = PNG_INTERLACE_ADAM7_PASSES;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ png_error(png_ptr, "unknown interlace type");
|
||||
+ }
|
||||
+
|
||||
+ /* Read each pass using local_row as intermediate buffer. */
|
||||
+ while (--passes >= 0)
|
||||
+ {
|
||||
+ png_uint_32 y = image->height;
|
||||
+ png_bytep output_row = first_row;
|
||||
+
|
||||
+ for (; y > 0; --y)
|
||||
+ {
|
||||
+ /* Read into local_row (gets transformed 8-bit data). */
|
||||
+ png_read_row(png_ptr, local_row, NULL);
|
||||
+
|
||||
+ /* Copy from local_row to user buffer. */
|
||||
+ memcpy(output_row, local_row, (size_t)row_bytes);
|
||||
+ output_row += row_bytes;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/* Just the row reading part of png_image_read. */
|
||||
static int
|
||||
png_image_read_composite(png_voidp argument)
|
||||
@@ -3547,6 +3595,7 @@ png_image_read_direct(png_voidp argument)
|
||||
int linear = (format & PNG_FORMAT_FLAG_LINEAR) != 0;
|
||||
int do_local_compose = 0;
|
||||
int do_local_background = 0; /* to avoid double gamma correction bug */
|
||||
+ int do_local_scale = 0; /* for interlaced 16-to-8 bit conversion */
|
||||
int passes = 0;
|
||||
|
||||
/* Add transforms to ensure the correct output format is produced then check
|
||||
@@ -3680,8 +3729,16 @@ png_image_read_direct(png_voidp argument)
|
||||
png_set_expand_16(png_ptr);
|
||||
|
||||
else /* 8-bit output */
|
||||
+ {
|
||||
png_set_scale_16(png_ptr);
|
||||
|
||||
+ /* For interlaced images, use local_row buffer to avoid overflow
|
||||
+ * in png_combine_row() which writes using IHDR bit-depth.
|
||||
+ */
|
||||
+ if (png_ptr->interlaced != 0)
|
||||
+ do_local_scale = 1;
|
||||
+ }
|
||||
+
|
||||
change &= ~PNG_FORMAT_FLAG_LINEAR;
|
||||
}
|
||||
|
||||
@@ -3957,6 +4014,24 @@ png_image_read_direct(png_voidp argument)
|
||||
return result;
|
||||
}
|
||||
|
||||
+ else if (do_local_scale != 0)
|
||||
+ {
|
||||
+ /* For interlaced 16-to-8 conversion, use an intermediate row buffer
|
||||
+ * to avoid buffer overflows in png_combine_row. The local_row is sized
|
||||
+ * for the transformed (8-bit) output, preventing the overflow that would
|
||||
+ * occur if png_combine_row wrote 16-bit data directly to the user buffer.
|
||||
+ */
|
||||
+ int result;
|
||||
+ png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr));
|
||||
+
|
||||
+ display->local_row = row;
|
||||
+ result = png_safe_execute(image, png_image_read_direct_scaled, display);
|
||||
+ display->local_row = NULL;
|
||||
+ png_free(png_ptr, row);
|
||||
+
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
else
|
||||
{
|
||||
png_alloc_size_t row_bytes = (png_alloc_size_t)display->row_bytes;
|
||||
@@ -4040,20 +4115,6 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
|
||||
int result;
|
||||
png_image_read_control display;
|
||||
|
||||
- /* Reject bit depth mismatches to avoid buffer overflows. */
|
||||
- png_uint_32 ihdr_bit_depth =
|
||||
- image->opaque->png_ptr->bit_depth;
|
||||
- int requested_linear =
|
||||
- (image->format & PNG_FORMAT_FLAG_LINEAR) != 0;
|
||||
- if (ihdr_bit_depth == 16 && !requested_linear)
|
||||
- return png_image_error(image,
|
||||
- "png_image_finish_read: "
|
||||
- "16-bit PNG must use 16-bit output format");
|
||||
- if (ihdr_bit_depth < 16 && requested_linear)
|
||||
- return png_image_error(image,
|
||||
- "png_image_finish_read: "
|
||||
- "8-bit PNG must not use 16-bit output format");
|
||||
-
|
||||
memset(&display, 0, (sizeof display));
|
||||
display.image = image;
|
||||
display.buffer = buffer;
|
||||
21
libpng-1.6-CVE-2025-66293_p1of2.patch
Normal file
21
libpng-1.6-CVE-2025-66293_p1of2.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/pngread.c b/pngread.c
|
||||
index 79917daaaf..ab62edd9d8 100644
|
||||
--- a/pngread.c
|
||||
+++ b/pngread.c
|
||||
@@ -3273,9 +3273,14 @@ png_image_read_composite(png_voidp argument)
|
||||
component += (255-alpha)*png_sRGB_table[outrow[c]];
|
||||
|
||||
/* So 'component' is scaled by 255*65535 and is
|
||||
- * therefore appropriate for the sRGB to linear
|
||||
- * conversion table.
|
||||
+ * therefore appropriate for the sRGB-to-linear
|
||||
+ * conversion table. Clamp to the valid range
|
||||
+ * as a defensive measure against an internal
|
||||
+ * libpng bug where the data is sRGB rather than
|
||||
+ * linear premultiplied.
|
||||
*/
|
||||
+ if (component > 255*65535)
|
||||
+ component = 255*65535;
|
||||
component = PNG_sRGB_FROM_LINEAR(component);
|
||||
}
|
||||
|
||||
88
libpng-1.6-CVE-2025-66293_p2of2.patch
Normal file
88
libpng-1.6-CVE-2025-66293_p2of2.patch
Normal file
@ -0,0 +1,88 @@
|
||||
diff --git a/pngread.c b/pngread.c
|
||||
index ab62edd9d8..f8ca2b7e31 100644
|
||||
--- a/pngread.c
|
||||
+++ b/pngread.c
|
||||
@@ -3207,6 +3207,7 @@ png_image_read_composite(png_voidp argument)
|
||||
ptrdiff_t step_row = display->row_bytes;
|
||||
unsigned int channels =
|
||||
(image->format & PNG_FORMAT_FLAG_COLOR) != 0 ? 3 : 1;
|
||||
+ int optimize_alpha = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0;
|
||||
int pass;
|
||||
|
||||
for (pass = 0; pass < passes; ++pass)
|
||||
@@ -3263,25 +3264,44 @@ png_image_read_composite(png_voidp argument)
|
||||
|
||||
if (alpha < 255) /* else just use component */
|
||||
{
|
||||
- /* This is PNG_OPTIMIZED_ALPHA, the component value
|
||||
- * is a linear 8-bit value. Combine this with the
|
||||
- * current outrow[c] value which is sRGB encoded.
|
||||
- * Arithmetic here is 16-bits to preserve the output
|
||||
- * values correctly.
|
||||
- */
|
||||
- component *= 257*255; /* =65535 */
|
||||
- component += (255-alpha)*png_sRGB_table[outrow[c]];
|
||||
-
|
||||
- /* So 'component' is scaled by 255*65535 and is
|
||||
- * therefore appropriate for the sRGB-to-linear
|
||||
- * conversion table. Clamp to the valid range
|
||||
- * as a defensive measure against an internal
|
||||
- * libpng bug where the data is sRGB rather than
|
||||
- * linear premultiplied.
|
||||
- */
|
||||
- if (component > 255*65535)
|
||||
- component = 255*65535;
|
||||
- component = PNG_sRGB_FROM_LINEAR(component);
|
||||
+ if (optimize_alpha != 0)
|
||||
+ {
|
||||
+ /* This is PNG_OPTIMIZED_ALPHA, the component value
|
||||
+ * is a linear 8-bit value. Combine this with the
|
||||
+ * current outrow[c] value which is sRGB encoded.
|
||||
+ * Arithmetic here is 16-bits to preserve the output
|
||||
+ * values correctly.
|
||||
+ */
|
||||
+ component *= 257*255; /* =65535 */
|
||||
+ component += (255-alpha)*png_sRGB_table[outrow[c]];
|
||||
+
|
||||
+ /* Clamp to the valid range to defend against
|
||||
+ * unforeseen cases where the data might be sRGB
|
||||
+ * instead of linear premultiplied.
|
||||
+ * (Belt-and-suspenders for GitHub Issue #764.)
|
||||
+ */
|
||||
+ if (component > 255*65535)
|
||||
+ component = 255*65535;
|
||||
+
|
||||
+ /* So 'component' is scaled by 255*65535 and is
|
||||
+ * therefore appropriate for the sRGB-to-linear
|
||||
+ * conversion table.
|
||||
+ */
|
||||
+ component = PNG_sRGB_FROM_LINEAR(component);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Compositing was already done on the palette
|
||||
+ * entries. The data is sRGB premultiplied on black.
|
||||
+ * Composite with the background in sRGB space.
|
||||
+ * This is not gamma-correct, but matches what was
|
||||
+ * done to the palette.
|
||||
+ */
|
||||
+ png_uint_32 background = outrow[c];
|
||||
+ component += ((255-alpha) * background + 127) / 255;
|
||||
+ if (component > 255)
|
||||
+ component = 255;
|
||||
+ }
|
||||
}
|
||||
|
||||
outrow[c] = (png_byte)component;
|
||||
diff --git a/pngrtran.c b/pngrtran.c
|
||||
index 2f52022551..507d11381e 100644
|
||||
--- a/pngrtran.c
|
||||
+++ b/pngrtran.c
|
||||
@@ -1843,6 +1843,7 @@ png_init_read_transformations(png_structrp png_ptr)
|
||||
* transformations elsewhere.
|
||||
*/
|
||||
png_ptr->transformations &= ~(PNG_COMPOSE | PNG_GAMMA);
|
||||
+ png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA;
|
||||
} /* color_type == PNG_COLOR_TYPE_PALETTE */
|
||||
|
||||
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
|
||||
34
libpng-CVE-2018-13785.patch
Normal file
34
libpng-CVE-2018-13785.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 9821583a771bfe2c75b7449d8ff83cb348291b3f Mon Sep 17 00:00:00 2001
|
||||
From: Cosmin Truta <ctruta@gmail.com>
|
||||
Date: Sun, 17 Jun 2018 22:56:29 -0400
|
||||
Subject: [PATCH] Fix the calculation of row_factor in png_check_chunk_length
|
||||
|
||||
(Bug report by Thuan Pham, SourceForge issue #278)
|
||||
---
|
||||
pngrutil.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pngrutil.c b/pngrutil.c
|
||||
index 8692933..eab2973 100644
|
||||
--- a/pngrutil.c
|
||||
+++ b/pngrutil.c
|
||||
@@ -3149,10 +3149,13 @@ png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
|
||||
{
|
||||
png_alloc_size_t idat_limit = PNG_UINT_31_MAX;
|
||||
size_t row_factor =
|
||||
- (png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
|
||||
- + 1 + (png_ptr->interlaced? 6: 0));
|
||||
+ (size_t)png_ptr->width
|
||||
+ * (size_t)png_ptr->channels
|
||||
+ * (png_ptr->bit_depth > 8? 2: 1)
|
||||
+ + 1
|
||||
+ + (png_ptr->interlaced? 6: 0);
|
||||
if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
|
||||
- idat_limit=PNG_UINT_31_MAX;
|
||||
+ idat_limit = PNG_UINT_31_MAX;
|
||||
else
|
||||
idat_limit = png_ptr->height * row_factor;
|
||||
row_factor = row_factor > 32566? 32566 : row_factor;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
12
libpng-coverity.patch
Normal file
12
libpng-coverity.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/libpng-config.in b/libpng-config.in
|
||||
index 3739eb9..7f6b2cc 100644
|
||||
--- a/libpng-config.in
|
||||
+++ b/libpng-config.in
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
version=`pkg-config --modversion libpng`
|
||||
prefix=`pkg-config --variable prefix libpng`
|
||||
-exec_prefix=`pkg-config --variable exec_prefix libpng`
|
||||
libdir=`pkg-config --variable libdir libpng`
|
||||
includedir=`pkg-config --variable includedir libpng`
|
||||
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
39
libpng-fix-arm-neon.patch
Normal file
39
libpng-fix-arm-neon.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4fb0778..930bf50 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -283,17 +283,21 @@ AC_ARG_ENABLE([arm-neon],
|
||||
[case "$enableval" in
|
||||
no|off)
|
||||
# disable the default enabling on __ARM_NEON__ systems:
|
||||
+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
|
||||
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
||||
[Disable ARM Neon optimizations])
|
||||
# Prevent inclusion of the assembler files below:
|
||||
enable_arm_neon=no;;
|
||||
check)
|
||||
+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
|
||||
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
||||
[Check for ARM Neon support at run-time]);;
|
||||
api)
|
||||
+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
|
||||
AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
|
||||
[Turn on ARM Neon optimizations at run-time]);;
|
||||
yes|on)
|
||||
+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
|
||||
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
||||
[Enable ARM Neon optimizations])
|
||||
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
|
||||
diff --git a/pngpriv.h b/pngpriv.h
|
||||
index 1997503..789206f 100644
|
||||
--- a/pngpriv.h
|
||||
+++ b/pngpriv.h
|
||||
@@ -125,7 +125,7 @@
|
||||
* associated assembler code, pass --enable-arm-neon=no to configure
|
||||
* or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
|
||||
*/
|
||||
-# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
|
||||
+# if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
|
||||
defined(PNG_ALIGNED_MEMORY_SUPPORTED)
|
||||
# define PNG_ARM_NEON_OPT 2
|
||||
# else
|
||||
23
libpng-multilib.patch
Normal file
23
libpng-multilib.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Use pkg-config to report libpng version and installation directories.
|
||||
|
||||
|
||||
diff -Naur libpng-1.5.5.orig/libpng-config.in libpng-1.5.5/libpng-config.in
|
||||
--- libpng-1.5.5.orig/libpng-config.in 2011-09-22 09:40:23.000000000 -0400
|
||||
+++ libpng-1.5.5/libpng-config.in 2011-10-05 01:03:32.335435187 -0400
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
-version="@PNGLIB_VERSION@"
|
||||
-prefix="@prefix@"
|
||||
-exec_prefix="@exec_prefix@"
|
||||
-libdir="@libdir@"
|
||||
-includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
+version=`pkg-config --modversion libpng`
|
||||
+prefix=`pkg-config --variable prefix libpng`
|
||||
+exec_prefix=`pkg-config --variable exec_prefix libpng`
|
||||
+libdir=`pkg-config --variable libdir libpng`
|
||||
+includedir=`pkg-config --variable includedir libpng`
|
||||
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
|
||||
I_opts="-I${includedir}"
|
||||
325
mingw-libpng.spec
Normal file
325
mingw-libpng.spec
Normal file
@ -0,0 +1,325 @@
|
||||
%?mingw_package_header
|
||||
|
||||
Name: mingw-libpng
|
||||
Version: 1.6.34
|
||||
Release: 1%{?dist}
|
||||
Summary: MinGW Windows Libpng library
|
||||
|
||||
License: zlib
|
||||
URL: http://www.libpng.org/pub/png/
|
||||
# Note: non-current tarballs get moved to the history/ subdirectory,
|
||||
# so look there if you fail to retrieve the version you want
|
||||
Source0: https://ftp-osl.osuosl.org/pub/libpng/src/libpng16/libpng-%{version}.tar.xz
|
||||
Source1: pngusr.dfa
|
||||
Patch0: libpng-multilib.patch
|
||||
Patch1: libpng-fix-arm-neon.patch
|
||||
Patch2: libpng-CVE-2018-13785.patch
|
||||
Patch3: libpng-coverity.patch
|
||||
Patch4: libpng-1.6-CVE-2025-64720.patch
|
||||
Patch5: libpng-1.6-CVE-2025-65018_p1of2.patch
|
||||
Patch6: libpng-1.6-CVE-2025-65018_p2of2.patch
|
||||
Patch7: libpng-1.6-CVE-2025-66293_p1of2.patch
|
||||
Patch8: libpng-1.6-CVE-2025-66293_p2of2.patch
|
||||
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw32-gcc
|
||||
BuildRequires: mingw32-binutils
|
||||
BuildRequires: mingw32-zlib
|
||||
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw64-gcc
|
||||
BuildRequires: mingw64-binutils
|
||||
BuildRequires: mingw64-zlib
|
||||
|
||||
|
||||
%description
|
||||
MinGW Windows Libpng library.
|
||||
|
||||
|
||||
# Win32
|
||||
%package -n mingw32-libpng
|
||||
Summary: MinGW Windows Libpng library
|
||||
Requires: pkgconfig
|
||||
|
||||
%description -n mingw32-libpng
|
||||
MinGW Windows Libpng library.
|
||||
|
||||
%package -n mingw32-libpng-static
|
||||
Summary: Static version of MinGW Windows Libpng library
|
||||
Requires: mingw32-libpng = %{version}-%{release}
|
||||
|
||||
%description -n mingw32-libpng-static
|
||||
MinGW Windows Libpng library.
|
||||
|
||||
This package contains static cross-compiled libraries.
|
||||
|
||||
# Win64
|
||||
%package -n mingw64-libpng
|
||||
Summary: MinGW Windows Libpng library
|
||||
Requires: pkgconfig
|
||||
|
||||
%description -n mingw64-libpng
|
||||
MinGW Windows Libpng library.
|
||||
|
||||
%package -n mingw64-libpng-static
|
||||
Summary: Static version of MinGW Windows Libpng library
|
||||
Requires: mingw64-libpng = %{version}-%{release}
|
||||
|
||||
%description -n mingw64-libpng-static
|
||||
MinGW Windows Libpng library.
|
||||
|
||||
This package contains static cross-compiled libraries.
|
||||
|
||||
|
||||
%?mingw_debug_package
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n libpng-%{version}
|
||||
# Provide pngusr.dfa for build.
|
||||
cp -p %{SOURCE1} .
|
||||
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1 -b .arm
|
||||
%patch -P 2 -p1 -b .CVE-2018-13785
|
||||
%patch -P 3 -p1 -b .coverity
|
||||
%patch -P 4 -p1 -b .CVE-2025-64720
|
||||
%patch -P 5 -p1 -b .CVE-2025-65018_p1of2
|
||||
%patch -P 6 -p1 -b .CVE-2025-65018_p2of2
|
||||
%patch -P 7 -p1 -b .CVE-2025-66293_p1of2
|
||||
%patch -P 8 -p1 -b .CVE-2025-66293_p2of2
|
||||
|
||||
autoreconf -vif
|
||||
|
||||
%build
|
||||
%mingw_configure
|
||||
%mingw_make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
# Drop all .la files
|
||||
find $RPM_BUILD_ROOT -name "*.la" -delete
|
||||
|
||||
# No need to distribute manpages which appear in the Fedora
|
||||
# native packages already.
|
||||
rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
|
||||
rm -rf $RPM_BUILD_ROOT%{mingw64_mandir}
|
||||
|
||||
|
||||
# Win32
|
||||
%files -n mingw32-libpng
|
||||
%license LICENSE
|
||||
%doc ANNOUNCE CHANGES README TODO
|
||||
%{mingw32_bindir}/libpng-config
|
||||
%{mingw32_bindir}/libpng16-16.dll
|
||||
%{mingw32_bindir}/libpng16-config
|
||||
%{mingw32_bindir}/png-fix-itxt.exe
|
||||
%{mingw32_bindir}/pngfix.exe
|
||||
%{mingw32_includedir}/libpng16
|
||||
%{mingw32_includedir}/png.h
|
||||
%{mingw32_includedir}/pngconf.h
|
||||
%{mingw32_includedir}/pnglibconf.h
|
||||
%{mingw32_libdir}/libpng.dll.a
|
||||
%{mingw32_libdir}/libpng16.dll.a
|
||||
%{mingw32_libdir}/pkgconfig/libpng.pc
|
||||
%{mingw32_libdir}/pkgconfig/libpng16.pc
|
||||
|
||||
%files -n mingw32-libpng-static
|
||||
%{mingw32_libdir}/libpng.a
|
||||
%{mingw32_libdir}/libpng16.a
|
||||
|
||||
# Win64
|
||||
%files -n mingw64-libpng
|
||||
%license LICENSE
|
||||
%doc ANNOUNCE CHANGES README TODO
|
||||
%{mingw64_bindir}/libpng-config
|
||||
%{mingw64_bindir}/libpng16-16.dll
|
||||
%{mingw64_bindir}/libpng16-config
|
||||
%{mingw64_bindir}/png-fix-itxt.exe
|
||||
%{mingw64_bindir}/pngfix.exe
|
||||
%{mingw64_includedir}/libpng16
|
||||
%{mingw64_includedir}/png.h
|
||||
%{mingw64_includedir}/pngconf.h
|
||||
%{mingw64_includedir}/pnglibconf.h
|
||||
%{mingw64_libdir}/libpng.dll.a
|
||||
%{mingw64_libdir}/libpng16.dll.a
|
||||
%{mingw64_libdir}/pkgconfig/libpng.pc
|
||||
%{mingw64_libdir}/pkgconfig/libpng16.pc
|
||||
|
||||
%files -n mingw64-libpng-static
|
||||
%{mingw64_libdir}/libpng.a
|
||||
%{mingw64_libdir}/libpng16.a
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Dec 27 2025 Lili Zhu <lizhu@redhat.com> - 1.6.34-1
|
||||
- Rebase to version 1.6.34
|
||||
- Fix the following CVEs
|
||||
CVE-2025-64720 CVE-2025-65018 CVE-2025-66293
|
||||
- Resolves: RHEL-131458
|
||||
- Resolves: RHEL-131471
|
||||
- Resolves: RHEL-133229
|
||||
|
||||
* Tue Aug 14 2018 Victor Toso <victortoso@redhat.com> - 1.6.29-4
|
||||
- ExclusiveArch: i686, x86_64
|
||||
- Related: rhbz#1615874
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.29-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.29-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Tue Jun 20 2017 Kalev Lember <klember@redhat.com> - 1.6.29-1
|
||||
- Update to 1.6.29
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.27-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Fri Dec 30 2016 Kalev Lember <klember@redhat.com> - 1.6.27-1
|
||||
- Update to 1.6.27
|
||||
|
||||
* Tue Oct 25 2016 Kalev Lember <klember@redhat.com> - 1.6.26-1
|
||||
- Update to 1.6.26
|
||||
- Don't set group tags
|
||||
|
||||
* Sun Oct 16 2016 Kalev Lember <klember@redhat.com> - 1.6.25-1
|
||||
- Update to 1.6.25
|
||||
|
||||
* Mon Aug 08 2016 Kalev Lember <klember@redhat.com> - 1.6.24-1
|
||||
- Update to 1.6.24
|
||||
|
||||
* Wed Jun 15 2016 Kalev Lember <klember@redhat.com> - 1.6.23-1
|
||||
- Update to 1.6.23
|
||||
|
||||
* Sat Feb 6 2016 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.6.21-1
|
||||
- Update to 1.6.21
|
||||
- Fixes various CVE's (RHBZ #1281760, #1281756)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.19-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Thu Nov 19 2015 Kalev Lember <klember@redhat.com> - 1.6.19-1
|
||||
- Update to 1.6.19
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.10-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.10-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Sat Mar 29 2014 Kalev Lember <kalevlember@gmail.com> - 1.6.10-1
|
||||
- Update to 1.6.10
|
||||
|
||||
* Wed Nov 20 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.6.7-1
|
||||
- Update to 1.6.7
|
||||
|
||||
* Sat Sep 7 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.6.3-1
|
||||
- Update to 1.6.3
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Sat Jul 13 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.6.2-1
|
||||
- Update to 1.6.2
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Sun Oct 07 2012 Kalev Lember <kalevlember@gmail.com> - 1.5.13-1
|
||||
- Update to 1.5.13 (CVE-2011-3464)
|
||||
|
||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.7-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Mar 10 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.5.7-4
|
||||
- Added win64 support
|
||||
|
||||
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.5.7-3
|
||||
- Renamed the source package to mingw-libpng (#800430)
|
||||
- Use mingw macros without leading underscore
|
||||
|
||||
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.5.7-2
|
||||
- Rebuild against the mingw-w64 toolchain
|
||||
|
||||
* Tue Jan 31 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.5.7-1
|
||||
- Update to 1.5.7
|
||||
- Dropped .la files
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Sat Dec 24 2011 Ivan Romanov <drizt@land.ru> - 1.4.8-2
|
||||
- New static subpackage
|
||||
|
||||
* Fri Jul 22 2011 Kalev Lember <kalevlember@gmail.com> - 1.4.8-1
|
||||
- Update to 1.4.8 (CVE-2011-2690, CVE-2011-2692)
|
||||
- Generate debuginfo subpackage
|
||||
- Removed static libs from the main package
|
||||
- Spec cleanup
|
||||
|
||||
* Wed Jun 29 2011 Richard W.M. Jones <rjones@redhat.com> - 1.4.3-3
|
||||
- Include fix for CVE-2011-2501 (RHBZ#717510, RHBZ#717511).
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Sun Jul 4 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.4.3-1
|
||||
- Update to 1.4.3
|
||||
- Fixes CVE-2010-1205 (BZ #608238)
|
||||
- Fixes CVE-2010-2249 (BZ #608644)
|
||||
- Use %%global instead of %%define
|
||||
- Fixed %%defattr tag
|
||||
- Dropped unneeded patches
|
||||
|
||||
* Fri Nov 20 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.2.40-2
|
||||
- In the previous build no symbols were exported in the resulting DLL making this
|
||||
package unusable. This should be fixed for now (but may need more research)
|
||||
|
||||
* Thu Nov 5 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.40-1
|
||||
- New upstream version 1.2.40.
|
||||
|
||||
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.37-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Tue Jun 9 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.37-1
|
||||
- New upstream version 1.2.37 to fix SECURITY bug RHBZ#504782.
|
||||
|
||||
* Wed Feb 25 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.35-1
|
||||
- Update to libpng 1.2.35, to fix CVE-2009-0040 (Tom Lane).
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.34-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.34-3
|
||||
- Rebuild for mingw32-gcc 4.4
|
||||
|
||||
* Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.34-2
|
||||
- Depend on mingw32-filesystem >= 40 so we can still build in F-10.
|
||||
|
||||
* Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.34-1
|
||||
- Rebase to 1.2.34 and patches from Fedora.
|
||||
- Requires pkgconfig.
|
||||
- Add documentation.
|
||||
|
||||
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.31-5
|
||||
- Rename mingw -> mingw32.
|
||||
|
||||
* Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 1.2.31-4
|
||||
- Add patches from rawhide RPM
|
||||
|
||||
* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.31-3
|
||||
- Don't duplicate Fedora native manpages.
|
||||
|
||||
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.31-2
|
||||
- Remove static library.
|
||||
|
||||
* Tue Sep 9 2008 Daniel P. Berrange <berrange@redhat.com> - 1.2.31-1
|
||||
- Initial RPM release
|
||||
4
pngusr.dfa
Normal file
4
pngusr.dfa
Normal file
@ -0,0 +1,4 @@
|
||||
# However, the default defaults seem a tad too restrictive for general
|
||||
# purpose use, so back them off a little.
|
||||
setting USER_CHUNK_CACHE_MAX default 1000
|
||||
setting USER_CHUNK_MALLOC_MAX default 1000000000
|
||||
Loading…
Reference in New Issue
Block a user