[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
Re: [MD:4978] Re: Meadow-2.00pre2 (KIKYOU)
- X-ml-count: 4980
- Subject: Re: [MD:4978] Re: Meadow-2.00pre2 (KIKYOU)
- From: "M.Fujii" <boochang@xxxxxxxxxxxx>
- Date: Tue, 11 May 2004 22:36:19 +0900 (JST)
- X-mailer: Mew version 3.3 on Emacs 21.1 / Mule 5.0 (SAKAKI)
藤井です。
From: MIYOSHI Masanori <miyoshi@xxxxxxxxxxxxxxxx>
Subject: Re: [MD:4978] Re: Meadow-2.00pre2 (KIKYOU)
Date: Tue, 11 May 2004 21:39:32 +0900
Message-ID: <uzn8fyw6z.wl%miyoshi@xxxxxxxxxxx>
> kose> (Meadow -q で起動しても)終了時に次のダイアログがでます。
> kose> これって何でしたっけ?
>
> あれ、失礼しました。
> 対策しておきました。
xstrdup をやめるように対策されているようですが、この文字列は
ImageMagick 内部でデアロケートされうると思いますので、以下のように修正
した方が良いのではないでしょうか。
ご検討宜しくお願いします。
------------------------------------------------------------
--- src/mw32fns.c.orig 2004-05-11 22:00:21.000000000 +0900
+++ src/mw32fns.c 2004-05-11 22:17:48.271500000 +0900
@@ -5953,6 +5953,7 @@
typedef MagickInfo *(*pregister_magick_info_t) (MagickInfo *);
typedef MagickInfo *(*pset_magick_info_t) (const char *);
typedef void *(*prelinquish_magick_memory_t) (void **memory);
+typedef void *(*pacquire_string_t) (const char *);
static HINSTANCE hmagick = NULL;
static ExceptionInfo magick_exception;
@@ -5987,6 +5988,7 @@
static pregister_magick_info_t pregister_magick_info;
static pset_magick_info_t pset_magick_info;
static prelinquish_magick_memory_t prelinquish_magick_memory;
+static pacquire_string_t pacquire_string;
/* ImageMagick function wrappers. */
@@ -6260,6 +6262,14 @@
return (*prelinquish_magick_memory) (memory);
}
+static void *
+magick_acquire_string (const char *source)
+{
+ if (pacquire_string == NULL)
+ return NULL;
+ return (*pacquire_string) (source);
+}
+
static int
resolve_imagemagick_api (void)
{
@@ -6325,7 +6335,8 @@
MAGICK_RESOLVE_FUNC (pset_magick_info, pset_magick_info_t, "SetMagickInfo");
MAGICK_RESOLVE_FUNC (prelinquish_magick_memory, prelinquish_magick_memory_t,
"RelinquishMagickMemory");
-
+ MAGICK_RESOLVE_FUNC (pacquire_string, pacquire_string_t, "AcquireString");
+
#undef MAGICK_RESOLVE_FUNC
return 1;
@@ -7712,8 +7723,8 @@
info_new->decoder = XPM_read_image;
info_new->encoder = info->encoder;
info_new->magick = info->magick;
- info_new->description = xstrdup ((void *) info->description);
- info_new->module = xstrdup ((void *) info->module);
+ info_new->description = magick_acquire_string (info->description);
+ info_new->module = magick_acquire_string ((void *) info->module);
magick_register_magick_info (info_new);
}
}
------------------------------------------------------------
--
藤井 正行 / Masayuki FUJII ( boochang@xxxxxxxxxxxx )