Skip to content

Commit 171dae0

Browse files
authored
fix heap corruption (issue #29) (#30)
- fixes #29
1 parent e72f8e9 commit 171dae0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/CProfileRecorderSampler/sampler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ swipr_state_abort_preparing(void) {
8787
static int
8888
swipr_dump_shared_objs(FILE *output) {
8989
size_t all_libs_count = 0;
90-
struct swipr_dynamic_lib *all_libs = calloc(1024, sizeof(*all_libs));
90+
struct swipr_dynamic_lib *all_libs = calloc(SWIPR_MAX_LIBS, sizeof(*all_libs));
9191
if (!all_libs) {
9292
return 1;
9393
}

0 commit comments

Comments
 (0)