Skip to content

Commit

Permalink
Fix path corruption
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
  • Loading branch information
1000TurquoisePogs authored Jul 28, 2023
1 parent 32e0a3a commit a3343a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,13 @@ static void set_shared_uss_env(ConfigManager *configmgr) {

int length = index - thisEnv;
char *key = malloc(length + 1);
memset(key, 0, sizeof(*key));
strncpy(key, thisEnv, length);

if (!arrayListContains(list, key)) {
arrayListAdd(list, key);
char *new_env = malloc(strlen(thisEnv));
memset(new_env, 0, sizeof(*new_env));
strncpy(new_env, thisEnv, strlen(thisEnv));
DEBUG("shared env pos %d is %s\n", idx, new_env);
shared_uss_env[idx++] = new_env;
Expand Down

0 comments on commit a3343a4

Please sign in to comment.