]> granicus.if.org Git - imagemagick/commitdiff
Allow room for file extention
authorCristy <urban-warrior@imagemagick.org>
Thu, 25 Jan 2018 00:58:53 +0000 (19:58 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 25 Jan 2018 00:58:53 +0000 (19:58 -0500)
coders/mpc.c

index 72f725acb6cec8888a32f71f66c1d8a6a7679462..d23996d2836c1abed3357178c2c9b86122a14839 100644 (file)
@@ -207,7 +207,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
       image=DestroyImageList(image);
       return((Image *) NULL);
     }
-  (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent);
+  (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6);
   AppendImageFormat("cache",cache_filename);
   c=ReadBlobByte(image);
   if (c == EOF)
@@ -1144,7 +1144,7 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image,
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
   if (status == MagickFalse)
     return(status);
-  (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent);
+  (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6);
   AppendImageFormat("cache",cache_filename);
   scene=0;
   offset=0;