#include "magick/exception-private.h"
#include "magick/image-private.h"
#include "magick/list.h"
+#include "magick/locale_.h"
#include "magick/log.h"
#include "magick/magick.h"
#include "magick/memory_.h"
return((Image *) NULL);
}
clone_info=CloneImageInfo(blob_info);
- (void) FormatMagickString(clone_info->filename,MaxTextExtent,"%s:%s",
+ (void) FormatLocaleString(clone_info->filename,MaxTextExtent,"%s:%s",
blob_info->magick,blob_info->filename);
image=ReadImage(clone_info,exception);
clone_info=DestroyImageInfo(clone_info);
}
*length=(size_t) MagickMin((MagickSizeType) offset,extent);
blob=(unsigned char *) NULL;
- if (~(*length) >= MaxTextExtent)
+ if (~(*length) >= (MaxTextExtent-1))
blob=(unsigned char *) AcquireQuantumMemory(*length+MaxTextExtent,
sizeof(*blob));
if (blob == (unsigned char *) NULL)
blob_info->file=fdopen(file,"wb");
if (blob_info->file != (FILE *) NULL)
{
- (void) FormatMagickString(image->filename,MaxTextExtent,"%s:%s",
+ (void) FormatLocaleString(image->filename,MaxTextExtent,"%s:%s",
image->magick,unique);
status=WriteImage(blob_info,image);
(void) fclose(blob_info->file);
blob_info->file=fdopen(file,"wb");
if (blob_info->file != (FILE *) NULL)
{
- (void) FormatMagickString(filename,MaxTextExtent,"%s:%s",
+ (void) FormatLocaleString(filename,MaxTextExtent,"%s:%s",
images->magick,unique);
status=WriteImages(blob_info,images,filename,exception);
(void) fclose(blob_info->file);
(void) RelinquishUniqueFileResource(filename);
return(MagickFalse);
}
- (void) FormatMagickString(byte_image->filename,MaxTextExtent,"%s:%s",format,
+ (void) FormatLocaleString(byte_image->filename,MaxTextExtent,"%s:%s",format,
filename);
DestroyBlob(byte_image);
byte_image->blob=CloneBlobInfo((BlobInfo *) NULL);
GetPathComponent(image->filename,RootPath,path);
if (*extension == '\0')
- (void) FormatMagickString(filename,MaxTextExtent,"%s-%.20g",
+ (void) FormatLocaleString(filename,MaxTextExtent,"%s-%.20g",
path,(double) image->scene);
else
- (void) FormatMagickString(filename,MaxTextExtent,"%s-%.20g.%s",
+ (void) FormatLocaleString(filename,MaxTextExtent,"%s-%.20g.%s",
path,(double) image->scene,extension);
}
(void) CopyMagickString(image->filename,filename,MaxTextExtent);