* Avenue for a fix
@ 2004-01-21 9:21 Richard Stallman
0 siblings, 0 replies; only message in thread
From: Richard Stallman @ 2004-01-21 9:21 UTC (permalink / raw)
This may be the right approach for a fix, but I don't think
it is safe to change current_buffer directly this way.
But now that the bug is probably identified, would someone
like to write a clean fix?
Date: Tue, 20 Jan 2004 17:33:34 +0300
From: Dmitry Antipov <dmitry.antipov@mail.ru>
X-Accept-Language: en-us, en
To: bug-gnu-emacs@gnu.org
Subject: Probably fixed [Re: Crash calling md5 for a list of buffers]
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org
Index: fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fns.c,v
retrieving revision 1.354
diff -u -r1.354 fns.c
--- fns.c 29 Dec 2003 13:51:54 -0000 1.354
+++ fns.c 20 Jan 2004 13:33:17 -0000
@@ -5386,7 +5386,7 @@
int start_char = 0, end_char = 0;
int start_byte = 0, end_byte = 0;
register int b, e;
- register struct buffer *bp;
+ register struct buffer *bp, *tem;
int temp;
if (STRINGP (object))
@@ -5542,8 +5542,10 @@
Fsignal (Qcoding_system_error, Fcons (coding_system,
Qnil));
}
}
-
+ /* At this moment, current buffer may be not equal to bp. */
+ tem = current_buffer, current_buffer = bp;
object = make_buffer_string (b, e, 0);
+ current_buffer = tem;
if (STRING_MULTIBYTE (object))
object = code_convert_string1 (object, coding_system, Qnil, 1);
_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-21 9:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-21 9:21 Avenue for a fix Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).