~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12badb9
)
multiprogress.c: Don't copy the contents of the temporary buffer.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 25 Mar 2022 01:16:39 +0000
(
01:16
+0000)
committer
Mark 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
patch
|
blob
|
blame
|
history
diff --git
a/multiprogress.c
b/multiprogress.c
index
6945620
..
b4d1193
100644
(file)
--- 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);
}