Message-ID: <35BE4178.833A7F80@gmx.net> Date: Tue, 28 Jul 1998 21:24:08 +0000 From: Robert Hoehne Organization: none provided MIME-Version: 1.0 To: djgpp-workers Subject: Very strange bug in re(f)malloc() Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk This bug is very easy to fix, but very hard to find :-) BTW: It was applied after the other here posted patch, so you will get a fuzzy offset warning when applying to the original alpha source (also the last 0726). --- src/libc/ansi/stdlib/fmalloc.c~ Tue Jul 28 21:05:58 1998 +++ src/libc/ansi/stdlib/fmalloc.c Tue Jul 28 21:06:14 1998 @@ -81,7 +81,7 @@ if (size <= oldsize) return ptr; newptr = (char *)malloc(size); - memcpy(ptr, newptr, oldsize); + memcpy(newptr, ptr, oldsize); free(ptr); return newptr; } -- ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************