mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 17:50:21 +01:00
Fix broken size calculation for xrealloc
Another one of those "untested code == broken code" situations.
This commit is contained in:
parent
f6b400a292
commit
439bf81e56
1 changed files with 2 additions and 1 deletions
|
|
@ -359,7 +359,8 @@ cairo_perf_report_sort_and_compute_stats (cairo_perf_report_t *report)
|
|||
new_samples_count += t->samples_count;
|
||||
if (new_samples_count > base->samples_size) {
|
||||
base->samples_size = new_samples_count;
|
||||
base->samples = xrealloc (base->samples, base->samples_size);
|
||||
base->samples = xrealloc (base->samples,
|
||||
base->samples_size * sizeof (cairo_perf_ticks_t));
|
||||
}
|
||||
for (t = base + 1; t < next; t++) {
|
||||
memcpy (&base->samples[base->samples_count], t->samples,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue