From 7ec8aa3fdd3a3771616694976c171b0a757d8ac1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 26 Nov 2001 00:36:28 +0000 Subject: [PATCH] (Fcall_process): When we make a bigger buffer for bufptr, don't lose the data in it. --- src/callproc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.39.5