From: cristy Date: Tue, 28 Oct 2014 10:16:44 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1826 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d86ee398890ccb3b37140c2b59ddc3605e56619c;p=imagemagick --- diff --git a/MagickCore/vision.c b/MagickCore/vision.c index bfee1fd40..e4da81911 100644 --- a/MagickCore/vision.c +++ b/MagickCore/vision.c @@ -665,6 +665,11 @@ MagickExport Image *ConnectedComponentsImage(const Image *image, } component_view=DestroyCacheView(component_view); equivalences=DestroyMatrixInfo(equivalences); + if (n > QuantumRange) + { + component_image=DestroyImage(component_image); + ThrowImageException(ResourceLimitError,"TooManyObjects"); + } artifact=GetImageArtifact(image,"connected-components:verbose"); if (IsStringTrue(artifact) != MagickFalse) status=ConnectedComponentsStatistics(image,component_image,(size_t) n, diff --git a/config/english.xml b/config/english.xml index 8c8ef786f..3dee2b581 100644 --- a/config/english.xml +++ b/config/english.xml @@ -1012,6 +1012,9 @@ memory allocation failed + + too many objects + unable to acquire string diff --git a/config/francais.xml b/config/francais.xml index 164598637..1fdf2f79b 100644 --- a/config/francais.xml +++ b/config/francais.xml @@ -1006,6 +1006,9 @@ Échec allocation mémoire + + too many objects + échec acquisition de la chaine