forked from enlightenment/efl
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>
This commit is contained in:
parent
19b2915863
commit
b2a8ef3d13
|
@ -108,8 +108,10 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data)
|
|||
|
||||
strcat(name, tmp);
|
||||
|
||||
fd = eina_file_mkstemp(name, NULL);
|
||||
if (fd < 0)
|
||||
/* try to create tmp file */
|
||||
if ((fd = mkstemp(name)) < 0)
|
||||
/* if ((fd = mkstemp(name)) < 0) */
|
||||
{
|
||||
ERR("Could not create temporary file: %m");
|
||||
free(name);
|
||||
|
|
Loading…
Reference in New Issue