multiprogress.c: Don't copy the contents of the temporary buffer.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 01:16:39 +0000 (01:16 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 18:51:48 +0000 (18:51 +0000)
Nothing relies on the temporary buffer's contents being preserved.

multiprogress.c

index 6945620..b4d1193 100644 (file)
@@ -302,7 +302,6 @@ static int grow_tempbuf(struct progress_render_state *render, size_t want)
   while (newsz < want) newsz *= 2;
   newbuf = malloc(newsz + 1); if (!newbuf) return (-1);
   newbuf[newsz] = 0;
-  if (render->tempsz) memcpy(newbuf, render->tempbuf, render->tempsz);
   free(render->tempbuf); render->tempbuf = newbuf; render->tempsz = newsz;
   return (0);
 }