summaryrefslogtreecommitdiffstats
path: root/package/gd/0002-gd_bmp-fix-build-with-uClibc.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2016-06-26 17:54:11 -0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-06-26 22:59:36 +0200
commitecc43a771ad82f369d2dccb3d2d4586250828e6e (patch)
tree043e3dec72f0dde9977fd508e01b9ffb19e66c07 /package/gd/0002-gd_bmp-fix-build-with-uClibc.patch
parent4ad77070286aea7844a9b8df1c20a64fc3d9e318 (diff)
downloadbuildroot-ecc43a771ad82f369d2dccb3d2d4586250828e6e.tar.gz
buildroot-ecc43a771ad82f369d2dccb3d2d4586250828e6e.zip
gd: security bump to version 2.2.2
Drop upstreamed patches. Drop autoreconf since it's no longer required. Patch 0002-no-zlib.patch is no longer required, and is in fact harmful. Update homepage URL. Fixes: CVE-2015-8874 - #215 Stack overflow with gdImageFillToBorder CVE-2016-3074 - gd2: handle corrupt images better CVE-2016-5767 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/gd/0002-gd_bmp-fix-build-with-uClibc.patch')
-rw-r--r--package/gd/0002-gd_bmp-fix-build-with-uClibc.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/gd/0002-gd_bmp-fix-build-with-uClibc.patch b/package/gd/0002-gd_bmp-fix-build-with-uClibc.patch
new file mode 100644
index 0000000000..89bc39186e
--- /dev/null
+++ b/package/gd/0002-gd_bmp-fix-build-with-uClibc.patch
@@ -0,0 +1,50 @@
+From ea2a03e983acf34a1320b460dcad43b7e0b0b14f Mon Sep 17 00:00:00 2001
+Message-Id: <ea2a03e983acf34a1320b460dcad43b7e0b0b14f.1397134306.git.baruch@tkos.co.il>
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Thu, 10 Apr 2014 15:49:13 +0300
+Subject: [PATCH] gd_bmp: fix build with uClibc
+
+Some architectures (like ARM) don't have the long double variants of math
+functions under uClibc. Add a local ceill definition in this case.
+
+Patch status: reported upstream,
+https://bitbucket.org/libgd/gd-libgd/issue/123/build-failure-agains-uclibc-arm
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+ src/gd_bmp.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/gd_bmp.c b/src/gd_bmp.c
+index 0fc021909f1b..11b3ec1baa01 100644
+--- a/src/gd_bmp.c
++++ b/src/gd_bmp.c
+@@ -25,6 +25,11 @@
+ #include "gdhelpers.h"
+ #include "bmp.h"
+
++#include <features.h>
++#if defined (__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__)
++#define NO_LONG_DOUBLE
++#endif
++
+ static int compress_row(unsigned char *uncompressed_row, int length);
+ static int build_rle_packet(unsigned char *row, int packet_type, int length, unsigned char *data);
+
+@@ -42,6 +47,13 @@ static int bmp_read_rle(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info);
+
+ #define BMP_DEBUG(s)
+
++#ifdef NO_LONG_DOUBLE
++long double ceill(long double x)
++{
++ return (long double) ceil((double) x);
++}
++#endif
++
+ static int gdBMPPutWord(gdIOCtx *out, int w)
+ {
+ /* Byte order is little-endian */
+--
+1.9.1
+
OpenPOWER on IntegriCloud