+2009-06-28 Andreas Schwab <schwab@linux-m68k.org>
+
+ * process.c (send_process): Keep decoded string in a local
+ variable and protect it from GC. (Bug#3521)
+
2009-06-28 Eli Zaretskii <eliz@gnu.org>
* term.c (create_tty_output) [MSDOS]: #ifdef away.
struct Lisp_Process *p = XPROCESS (proc);
int rv;
struct coding_system *coding;
- struct gcpro gcpro1;
+ struct gcpro gcpro1, gcpro2;
SIGTYPE (*volatile old_sigpipe) ();
+ Lisp_Object dst_object = Qnil;
- GCPRO1 (object);
+ GCPRO2 (object, dst_object);
if (p->raw_status_new)
update_status (p);
}
len = coding->produced;
- buf = SDATA (coding->dst_object);
+ dst_object = coding->dst_object;
+ buf = SDATA (dst_object);
}
if (pty_max_bytes == 0)
/* Running filters might relocate buffers or strings.
Arrange to relocate BUF. */
if (CODING_REQUIRE_ENCODING (coding))
- offset = buf - SDATA (coding->dst_object);
+ offset = buf - SDATA (dst_object);
else if (BUFFERP (object))
offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf);
else if (STRINGP (object))
#endif
if (CODING_REQUIRE_ENCODING (coding))
- buf = offset + SDATA (coding->dst_object);
+ buf = offset + SDATA (dst_object);
else if (BUFFERP (object))
buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset);
else if (STRINGP (object))