From 777e314540d93afb5c6f831afceb35585de67106 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 24 Aug 2018 20:59:00 -0400 Subject: [PATCH] ... --- MagickCore/static.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MagickCore/static.c b/MagickCore/static.c index fafa106ab..14cf7c066 100644 --- a/MagickCore/static.c +++ b/MagickCore/static.c @@ -378,6 +378,9 @@ MagickExport MagickBooleanType RegisterStaticModule(const char *module, char module_name[MagickPathExtent]; + PolicyRights + rights; + register const CoderInfo *p; @@ -391,6 +394,14 @@ MagickExport MagickBooleanType RegisterStaticModule(const char *module, Assign module name from alias. */ assert(module != (const char *) NULL); + rights=ReadPolicyRights; + if (IsRightsAuthorized(ModulePolicyDomain,rights,module) == MagickFalse) + { + errno=EPERM; + (void) ThrowMagickException(exception,GetMagickModule(),PolicyError, + "NotAuthorized","`%s'",module); + return(MagickFalse); + } (void) CopyMagickString(module_name,module,MagickPathExtent); p=GetCoderInfo(module,exception); if (p != (CoderInfo *) NULL) -- 2.40.0