summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_shm/evas_shm.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-07-08 08:46:12 -0400
committerChris Michael <cp.michael@samsung.com>2016-07-08 08:51:54 -0400
commitb2a8ef3d1310be74a720e2a8c1bf870741f3f231 (patch)
tree17ba7ae4785577355094af1bac3c61253b87ffac /src/modules/evas/engines/wayland_shm/evas_shm.c
parent19b291586336107c0d4d4cb02c44c7bc82f7ea1b (diff)
evas-wayland-shm: Fix Insecure temporary file
Fix using mkstemp directly without securely setting umask first by making use of eina_file_mkstemp function which does set umask. Fixes Coverity CID1357164 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/modules/evas/engines/wayland_shm/evas_shm.c')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 2f4fe59245..690d7a67ab 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -108,8 +108,10 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data)
108 108
109 strcat(name, tmp); 109 strcat(name, tmp);
110 110
111 fd = eina_file_mkstemp(name, NULL);
112 if (fd < 0)
111 /* try to create tmp file */ 113 /* try to create tmp file */
112 if ((fd = mkstemp(name)) < 0) 114 /* if ((fd = mkstemp(name)) < 0) */
113 { 115 {
114 ERR("Could not create temporary file: %m"); 116 ERR("Could not create temporary file: %m");
115 free(name); 117 free(name);