summaryrefslogtreecommitdiff
path: root/src/modules/flow/ff.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-09-06 23:16:29 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-09-06 23:16:29 -0700
commitcce41f3a6b78358221c5789249a7db03c2e98a50 (patch)
tree1fcab0aaead1917251b404a21c158760acbbc51b /src/modules/flow/ff.c
parentb75fd1eed010a73802b9a2a43579df24d5166c38 (diff)
modules/flow: fix elements overflow bug
s->count isn't always perfectly divisable by n_cpus, which is why ctxt->n_elements is computed from n_cpus * elements_per_cpu in the transition to threaded rendering for flow. That's all fine and dandy, but the ctxt->elements initialization loop was still using the vestigial s->count from the pre-threaded implementation. So on core counts where ctxt->n_elements was smaller than s->count, initialization scribbled. Thanks Sketch for assistance in chasing this down w/ASAN enabled on a box that exhibited crashing w/rtv,channels=flow.
Diffstat (limited to 'src/modules/flow/ff.c')
-rw-r--r--src/modules/flow/ff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/flow/ff.c b/src/modules/flow/ff.c
index f4280b9..98ac597 100644
--- a/src/modules/flow/ff.c
+++ b/src/modules/flow/ff.c
@@ -41,7 +41,7 @@ ff_t * ff_free(ff_t *ff)
ff_t * ff_new(unsigned size, void (*populator)(void *context, unsigned size, const ff_data_t *other, ff_data_t *field), void *context)
{
- ff_t *ff;
+ ff_t *ff;
ff = calloc(1, sizeof(ff_t));
if (!ff)
© All Rights Reserved