From 933bbefa11c757ab12260355f93b12aa9b4824c6 Mon Sep 17 00:00:00 2001 From: Snaipe Date: Sun, 6 Sep 2015 00:25:29 +0200 Subject: [PATCH] Fixed wrong allocation size for theory indices --- src/theories.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theories.c b/src/theories.c index 7cc86d9..3bf0f5b 100644 --- a/src/theories.c +++ b/src/theories.c @@ -186,7 +186,7 @@ static void concat_arg(char (*msg)[4096], struct criterion_datapoints *dps, size void cr_theory_main(struct criterion_datapoints *dps, size_t datapoints, void (*fnptr)(void)) { struct criterion_theory_context *ctx = cr_theory_init(); - size_t *indices = malloc(datapoints); + size_t *indices = malloc(sizeof (size_t) * datapoints); memset(indices, 0, datapoints * sizeof (size_t)); bool has_next = true;