Skip to content

Commit

Permalink
Fix #374
Browse files Browse the repository at this point in the history
  • Loading branch information
agroce authored Apr 24, 2021
1 parent f5be076 commit f0450d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/DeepState.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@ void *DeepState_MemScrub(void *pointer, size_t data_size) {
struct DeepState_SwarmConfig *DeepState_NewSwarmConfig(unsigned fcount, const char* file, unsigned line,
enum DeepState_SwarmType stype) {
struct DeepState_SwarmConfig *new_config = malloc(sizeof(struct DeepState_SwarmConfig));
new_config->file = malloc(strlen(file) + 1);
strncpy(new_config->file, file, strlen(file));
size_t buf_len = strlen(file) + 1;
new_config->file = malloc(buf_len);
strncpy(new_config->file, file, buf_len);
new_config->line = line;
new_config->orig_fcount = fcount;
new_config->fcount = 0;
Expand Down

0 comments on commit f0450d6

Please sign in to comment.