[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avenue for a fix
From: |
Richard Stallman |
Subject: |
Avenue for a fix |
Date: |
Wed, 21 Jan 2004 04:21:18 -0500 |
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 <address@hidden>
X-Accept-Language: en-us, en
To: address@hidden
Subject: Probably fixed [Re: Crash calling md5 for a list of buffers]
Sender: address@hidden
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
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Avenue for a fix,
Richard Stallman <=