diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-08-30 23:16:19 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-08-30 23:16:19 +0000 |
commit | 790b3aac7676a49f59a434ea136eb64191a98a2f (patch) | |
tree | bc9cafa0ed0d5777700b10be1dbef196ea712a87 /Build/source/libs/gd/libgd-src/src/gd_gd2.c | |
parent | da65270cdbb449c68e6e9f06dd8089b64275a2d3 (diff) |
libgd 2.2.5
git-svn-id: svn://tug.org/texlive/trunk@45180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/gd_gd2.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/src/gd_gd2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/gd_gd2.c b/Build/source/libs/gd/libgd-src/src/gd_gd2.c index c2904cafa19..85106bc9273 100644 --- a/Build/source/libs/gd/libgd-src/src/gd_gd2.c +++ b/Build/source/libs/gd/libgd-src/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" @@ -508,15 +509,13 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in) if (im->trueColor) { if (!gdGetInt (&im->tpixels[y][x], in)) { gd_error("gd2: EOF while reading\n"); - gdImageDestroy(im); - return NULL; + goto fail; } } else { int ch; if (!gdGetByte (&ch, in)) { gd_error("gd2: EOF while reading\n"); - gdImageDestroy(im); - return NULL; + goto fail; } im->pixels[y][x] = ch; } |