From: Mark Wooding Date: Fri, 25 Mar 2022 01:16:39 +0000 (+0000) Subject: multiprogress.c: Don't copy the contents of the temporary buffer. X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/commitdiff_plain/97da6250b2ccbf478085ff78647ef98416b9083c multiprogress.c: Don't copy the contents of the temporary buffer. Nothing relies on the temporary buffer's contents being preserved. --- diff --git a/multiprogress.c b/multiprogress.c index 6945620..b4d1193 100644 --- a/multiprogress.c +++ b/multiprogress.c @@ -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); }