Mercurial > emacs
diff src/callproc.c @ 41528:e6244d9fb1c6
(Fcall_process): When we make a bigger buffer for bufptr,
don't lose the data in it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 26 Nov 2001 00:36:28 +0000 |
parents | cdfd4d09b79a |
children | 56385cb63c61 |
line wrap: on
line diff
--- a/src/callproc.c Mon Nov 26 00:34:09 2001 +0000 +++ b/src/callproc.c Mon Nov 26 00:36:28 2001 +0000 @@ -897,8 +897,12 @@ 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)