From 0fccddba75c68e7dd70f26ee595995bffba6dfe1 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 7 Mar 2016 16:26:01 +0100 Subject: [PATCH] add error check --- ext/gd/libgd/gd_webp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/gd/libgd/gd_webp.c b/ext/gd/libgd/gd_webp.c index eef65f79fb..e85e9d9ffa 100644 --- a/ext/gd/libgd/gd_webp.c +++ b/ext/gd/libgd/gd_webp.c @@ -14,6 +14,8 @@ gdImagePtr gdImageCreateFromWebp (FILE * inFile) { gdImagePtr im; gdIOCtx *in = gdNewFileCtx(inFile); + if (!in) + return 0; im = gdImageCreateFromWebpCtx(in); in->gd_free(in); -- 2.40.0