diff options
Diffstat (limited to 'coders/ept.c')
-rw-r--r-- | coders/ept.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/coders/ept.c b/coders/ept.c index abbe7cc..3d96264 100644 --- a/coders/ept.c +++ b/coders/ept.c @@ -1,5 +1,5 @@ /* -% Copyright (C) 2003-2020 GraphicsMagick Group +% Copyright (C) 2003-2022 GraphicsMagick Group % Copyright (C) 2002 ImageMagick Studio % Copyright 1991-1999 E. I. du Pont de Nemours and Company % @@ -258,6 +258,10 @@ static Image *ReadEPTImage(const ImageInfo *image_info, (void) LogMagickEvent(CoderEvent,GetMagickModule(), "Copying Postscript to temporary file \"%s\" ...", postscript_filename); + bounds.x1=0.0; + bounds.y1=0.0; + bounds.x2=0.0; + bounds.y2=0.0; for (i=0; i < filesize; i++) { if ((c=ReadBlobByte(image)) == EOF) @@ -398,8 +402,8 @@ static Image *ReadEPTImage(const ImageInfo *image_info, { do { - (void) strcpy(image->magick,"PS"); - (void) strlcpy(image->filename,filename,MaxTextExtent); + (void) strlcpy(image->magick,"PS",sizeof(image->magick)); + (void) strlcpy(image->filename,filename,sizeof(image->filename)); next_image=SyncNextImageInList(image); if (next_image != (Image *) NULL) image=next_image; @@ -555,7 +559,7 @@ static unsigned int WriteEPTImage(const ImageInfo *image_info,Image *image) assert(image != (Image *) NULL); assert(image->signature == MagickSignature); - logging=IsEventLogging(); + logging=IsEventLogged(CoderEvent); (void) strlcpy(filename,image->filename,MaxTextExtent); (void) strlcpy(ps_filename,image->magick_filename,MaxTextExtent); @@ -571,16 +575,16 @@ static unsigned int WriteEPTImage(const ImageInfo *image_info,Image *image) ThrowWriterTemporaryFileException(ps_filename); /* Select desired EPS level */ - (void) strcpy(subformat,"eps"); + (void) strlcpy(subformat,"eps",sizeof(subformat)); if (LocaleCompare(image_info->magick,"EPT2") == 0) - (void) strcpy(subformat,"eps2"); + (void) strlcpy(subformat,"eps2",sizeof(subformat)); else if (LocaleCompare(image_info->magick,"EPT3") == 0) - (void) strcpy(subformat,"eps3"); + (void) strlcpy(subformat,"eps3",sizeof(subformat)); /* JPEG compression requires at least EPS2 */ if ((image->compression == JPEGCompression) && (LocaleCompare(subformat,"EPS") == 0)) - (void) strcpy(subformat,"eps2"); + (void) strlcpy(subformat,"eps2",sizeof(subformat)); FormatString(image->filename,"%s:%.1024s",subformat,ps_filename); if (logging) |