(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename);
assert(exception != (ExceptionInfo *) NULL);
*length=0;
+ status=IsRightsAuthorized(PathPolicyDomain,ReadPolicyRights,filename);
+ if (status == MagickFalse)
+ {
+ errno=EPERM;
+ (void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
+ "NotAuthorized","`%s'",filename);
+ return(NULL);
+ }
status=GetPathAttributes(filename,&attributes);
if ((status == MagickFalse) || (S_ISDIR(attributes.st_mode) != 0))
{
int
file;
+ MagickBooleanType
+ *status;
+
size_t
length,
quantum;
assert(image->signature == MagickCoreSignature);
assert(filename != (const char *) NULL);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename);
+ status=IsRightsAuthorized(PathPolicyDomain,WritePolicyRights,filename);
+ if (status == MagickFalse)
+ {
+ errno=EPERM;
+ (void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
+ "NotAuthorized","`%s'",filename);
+ return(MagickFalse);
+ }
file=fileno(stdin);
if (LocaleCompare(filename,"-") != 0)
file=open_utf8(filename,O_RDONLY | O_BINARY,0);
draw_info=DestroyDrawInfo(draw_info);
return(DestroyImageList(image));
}
+ if (*draw_info->primitive == '@')
+ {
+ draw_info=DestroyDrawInfo(draw_info);
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+ }
(void) DrawImage(image,draw_info,exception);
(void) SetImageArtifact(image,"MVG",draw_info->primitive);
draw_info=DestroyDrawInfo(draw_info);