diff options
-rw-r--r-- | src/tbm_bufmgr_shm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tbm_bufmgr_shm.c b/src/tbm_bufmgr_shm.c index 8d4cfb0..3315b68 100644 --- a/src/tbm_bufmgr_shm.c +++ b/src/tbm_bufmgr_shm.c @@ -262,8 +262,8 @@ _shm_create_anonymous_file(off_t size) if (!name) return -1; - strcpy(name, path); - strcat(name, template); + strncpy(name, path, strlen(path)); + strncat(name, template, sizeof(template)); fd = _shm_create_tmpfile_cloexec(name); |