diff options
author | SooChan Lim <sc1.lim@samsung.com> | 2018-10-29 15:53:20 +0900 |
---|---|---|
committer | SooChan Lim <sc1.lim@samsung.com> | 2018-10-29 15:53:20 +0900 |
commit | 3388ed6367e3b8d2ff368a0e5efa24a5c9240e0f (patch) | |
tree | d71de12a24ba430da82ec68b0b8bd329c2399a2a | |
parent | 1ac346bc0a6f1b32fe09cf50d747d668399aa02d (diff) | |
download | libtbm-shm-3388ed6367e3b8d2ff368a0e5efa24a5c9240e0f.tar.gz libtbm-shm-3388ed6367e3b8d2ff368a0e5efa24a5c9240e0f.tar.bz2 libtbm-shm-3388ed6367e3b8d2ff368a0e5efa24a5c9240e0f.zip |
use the strncpy and the strncat
Change-Id: I449126b9195eb26915a589fa1852dbcee0c7bb54
-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); |