From: Richard M. Stallman Date: Mon, 26 Nov 2001 00:36:28 +0000 (+0000) Subject: (Fcall_process): When we make a bigger buffer for bufptr, X-Git-Tag: ttn-vms-21-2-B4~18158 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ec8aa3fdd3a3771616694976c171b0a757d8ac1;p=emacs.git (Fcall_process): When we make a bigger buffer for bufptr, don't lose the data in it. --- diff --git a/src/callproc.c b/src/callproc.c index 21cfc11dd66..23f2b377b43 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -897,8 +897,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) but not past 64k. */ if (bufsize < 64 * 1024 && total_read > 32 * bufsize) { + char *tempptr; bufsize *= 2; - bufptr = (char *) alloca (bufsize); + + tempptr = (char *) alloca (bufsize); + bcopy (bufptr, tempptr, bufsize / 2); + bufptr = tempptr; } if (!NILP (display) && INTERACTIVE)