diff --git a/src/shm_main.c b/src/shm_main.c index 32356c113..060252c3a 100644 --- a/src/shm_main.c +++ b/src/shm_main.c @@ -509,7 +509,7 @@ sr_shmmain_open(sr_shm_t *shm, int *created) ATOMIC_STORE_RELAXED(main_shm->new_sr_sid, 1); ATOMIC_STORE_RELAXED(main_shm->new_sub_id, 1); ATOMIC_STORE_RELAXED(main_shm->new_evpipe_num, 1); - strncpy(main_shm->repo_path, sr_get_repo_path(), sizeof main_shm->repo_path); + strncpy(main_shm->repo_path, sr_get_repo_path(), sizeof main_shm->repo_path - 1); /* remove leftover event pipes */ sr_remove_evpipes();