From: Kim F. Storm Date: Mon, 12 Sep 2005 13:42:49 +0000 (+0000) Subject: (auto_save_error): Pass copy of lisp string to message2. X-Git-Tag: emacs-pretest-22.0.90~7144 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dfc22242b5b96d0344fdadb23e723e2f637af40f;p=emacs.git (auto_save_error): Pass copy of lisp string to message2. --- diff --git a/src/fileio.c b/src/fileio.c index 53ae967e285..a51371be0e6 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5769,6 +5769,8 @@ auto_save_error (error) Lisp_Object args[3], msg; int i, nbytes; struct gcpro gcpro1; + char *msgbuf; + USE_SAFE_ALLOCA; ring_bell (); @@ -5778,13 +5780,15 @@ auto_save_error (error) msg = Fformat (3, args); GCPRO1 (msg); nbytes = SBYTES (msg); + SAFE_ALLOCA (msgbuf, char *, nbytes); + bcopy (SDATA (msg), msgbuf, nbytes); for (i = 0; i < 3; ++i) { if (i == 0) - message2 (SDATA (msg), nbytes, STRING_MULTIBYTE (msg)); + message2 (msgbuf, nbytes, STRING_MULTIBYTE (msg)); else - message2_nolog (SDATA (msg), nbytes, STRING_MULTIBYTE (msg)); + message2_nolog (msgbuf, nbytes, STRING_MULTIBYTE (msg)); Fsleep_for (make_number (1), Qnil); }