Skip to content

Commit 76efa96

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/1201
1 parent 6b6bff0 commit 76efa96

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

Diff for: coders/png.c

+11-8
Original file line numberDiff line numberDiff line change
@@ -4560,7 +4560,11 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
45604560
chunk=(unsigned char *) AcquireQuantumMemory(length,sizeof(*chunk));
45614561

45624562
if (chunk == (unsigned char *) NULL)
4563-
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
4563+
{
4564+
DestroyJNG(NULL,&color_image,&color_image_info,
4565+
&alpha_image,&alpha_image_info);
4566+
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
4567+
}
45644568

45654569
for (i=0; i < (ssize_t) length; i++)
45664570
{
@@ -4587,13 +4591,12 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
45874591
jng_width=(png_uint_32)mng_get_long(p);
45884592
jng_height=(png_uint_32)mng_get_long(&p[4]);
45894593
if ((jng_width == 0) || (jng_height == 0))
4590-
{
4591-
DestroyJNG(chunk,&color_image,&color_image_info,
4592-
&alpha_image,&alpha_image_info);
4593-
4594-
ThrowReaderException(CorruptImageError,
4595-
"NegativeOrZeroImageSize");
4596-
}
4594+
{
4595+
DestroyJNG(chunk,&color_image,&color_image_info,
4596+
&alpha_image,&alpha_image_info);
4597+
ThrowReaderException(CorruptImageError,
4598+
"NegativeOrZeroImageSize");
4599+
}
45974600
jng_color_type=p[8];
45984601
jng_image_sample_depth=p[9];
45994602
jng_image_compression_method=p[10];

Diff for: configure

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-5.
3+
# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-6.
44
#
55
# Report bugs to <https://github.com/ImageMagick/ImageMagick/issues>.
66
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
590590
# Identity of this package.
591591
PACKAGE_NAME='ImageMagick'
592592
PACKAGE_TARNAME='ImageMagick'
593-
PACKAGE_VERSION='7.0.8-5'
594-
PACKAGE_STRING='ImageMagick 7.0.8-5'
593+
PACKAGE_VERSION='7.0.8-6'
594+
PACKAGE_STRING='ImageMagick 7.0.8-6'
595595
PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues'
596596
PACKAGE_URL='https://www.imagemagick.org'
597597

@@ -1842,7 +1842,7 @@ if test "$ac_init_help" = "long"; then
18421842
# Omit some internal or obsolete options to make the list less imposing.
18431843
# This message is too long to be a string in the A/UX 3.1 sh.
18441844
cat <<_ACEOF
1845-
\`configure' configures ImageMagick 7.0.8-5 to adapt to many kinds of systems.
1845+
\`configure' configures ImageMagick 7.0.8-6 to adapt to many kinds of systems.
18461846

18471847
Usage: $0 [OPTION]... [VAR=VALUE]...
18481848

@@ -1917,7 +1917,7 @@ fi
19171917

19181918
if test -n "$ac_init_help"; then
19191919
case $ac_init_help in
1920-
short | recursive ) echo "Configuration of ImageMagick 7.0.8-5:";;
1920+
short | recursive ) echo "Configuration of ImageMagick 7.0.8-6:";;
19211921
esac
19221922
cat <<\_ACEOF
19231923

@@ -2204,7 +2204,7 @@ fi
22042204
test -n "$ac_init_help" && exit $ac_status
22052205
if $ac_init_version; then
22062206
cat <<\_ACEOF
2207-
ImageMagick configure 7.0.8-5
2207+
ImageMagick configure 7.0.8-6
22082208
generated by GNU Autoconf 2.69
22092209

22102210
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3255,7 +3255,7 @@ cat >config.log <<_ACEOF
32553255
This file contains any messages produced by compilers while
32563256
running configure, to aid debugging if configure makes a mistake.
32573257

3258-
It was created by ImageMagick $as_me 7.0.8-5, which was
3258+
It was created by ImageMagick $as_me 7.0.8-6, which was
32593259
generated by GNU Autoconf 2.69. Invocation command line was
32603260

32613261
$ $0 $@
@@ -4241,7 +4241,7 @@ fi
42414241

42424242
# Define the identity of the package.
42434243
PACKAGE='ImageMagick'
4244-
VERSION='7.0.8-5'
4244+
VERSION='7.0.8-6'
42454245

42464246

42474247
cat >>confdefs.h <<_ACEOF
@@ -4551,11 +4551,11 @@ MAGICK_MINOR_VERSION=0
45514551

45524552
MAGICK_MICRO_VERSION=8
45534553

4554-
MAGICK_PATCHLEVEL_VERSION=5
4554+
MAGICK_PATCHLEVEL_VERSION=6
45554555

4556-
MAGICK_VERSION=7.0.8-5
4556+
MAGICK_VERSION=7.0.8-6
45574557

4558-
MAGICK_GIT_REVISION=14506:0e75f0a50:20180703
4558+
MAGICK_GIT_REVISION=14516:c7537dd70:20180705
45594559

45604560

45614561
# Substitute library versioning
@@ -37632,7 +37632,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3763237632
# report actual input values of CONFIG_FILES etc. instead of their
3763337633
# values after options handling.
3763437634
ac_log="
37635-
This file was extended by ImageMagick $as_me 7.0.8-5, which was
37635+
This file was extended by ImageMagick $as_me 7.0.8-6, which was
3763637636
generated by GNU Autoconf 2.69. Invocation command line was
3763737637

3763837638
CONFIG_FILES = $CONFIG_FILES
@@ -37699,7 +37699,7 @@ _ACEOF
3769937699
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3770037700
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
3770137701
ac_cs_version="\\
37702-
ImageMagick config.status 7.0.8-5
37702+
ImageMagick config.status 7.0.8-6
3770337703
configured by $0, generated by GNU Autoconf 2.69,
3770437704
with options \\"\$ac_cs_config\\"
3770537705

0 commit comments

Comments
 (0)