diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-01-19 06:06:01 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-01-19 06:06:01 +0100 |
commit | 7fe4c34767d17237ec2baffe2be5eed46ff7e275 (patch) | |
tree | d9c324d7d8ec0b8f91417753835d309f2599d5a1 | |
parent | 7f443b0013e199c1462fe7d015d4ecfd1b2e4168 (diff) |
gd: add upstream patch
-rw-r--r-- | gd-upstream.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gd-upstream.patch b/gd-upstream.patch new file mode 100644 index 0000000..1cb173c --- /dev/null +++ b/gd-upstream.patch @@ -0,0 +1,40 @@ +From c9b601a658a79e6ea2aad29fbf60ca6e24ccef1e Mon Sep 17 00:00:00 2001 +From: "Christoph M. Becker" <cmbecker69@gmx.de> +Date: Wed, 18 Jan 2017 13:59:02 +0100 +Subject: [PATCH] Fix build issue regarding INT_MAX + +For portability gd_gd2.c needs to include <limits.h>. +--- + src/gd_gd2.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gd_gd2.c b/src/gd_gd2.c +index c2904ca..049c4c5 100644 +--- a/src/gd_gd2.c ++++ b/src/gd_gd2.c +@@ -74,6 +74,7 @@ + + /* 2.0.29: no more errno.h, makes windows happy */ + #include <math.h> ++#include <limits.h> + #include <string.h> + #include "gd.h" + #include "gd_errors.h" + src/gd_io_dp.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gd_io_dp.c b/src/gd_io_dp.c +index eda2eeb..cb38794 100644 +--- a/src/gd_io_dp.c ++++ b/src/gd_io_dp.c +@@ -292,6 +292,10 @@ static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len) + rlen = dp->realSize - dp->pos; + } + ++ if (rlen < 0) { ++ return 0; ++ } ++ + memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen); + dp->pos += rlen; + |