elementary: safer call to mkstemp.

SVN revision: 80409
This commit is contained in:
Cedric BAIL 2012-12-07 04:03:01 +00:00
parent 0e03e10b06
commit 8c3981293b
3 changed files with 11 additions and 2 deletions

View File

@ -775,11 +775,16 @@
* Fix forgotten break in elm_map that would have thrown error when the
action was properly taken in fact.
2012-12-06 Daniel Juyung Seo (SeoZ)
2012-12-06 Daniel Juyung Seo (SeoZ)
* Fix wheel scroll direction with shift.
2012-12-06 ChunEon Park (Hermet)
2012-12-06 ChunEon Park (Hermet)
* Fix the mapbuf to show the content always. Sometimes mapbuf couldn't show
the content properly.
2012-12-07 Cedric Bail
* Safer call to mkstemp in elm_cnp.

View File

@ -83,6 +83,7 @@ Fixes:
* Fix wheel scroll direction with shift.
* Fix the mapbuf to show it's content properly, If the content doesn't
have resized, it wouldn't be showed up.
* Safer call to mkstemp in elm_cnp.
Removals:

View File

@ -1872,6 +1872,7 @@ _tempfile_new(int size)
#ifdef HAVE_MMAN_H
Tmp_Info *info;
const char *tmppath;
mode_t cur_umask;
int len;
info = malloc(sizeof(Tmp_Info));
@ -1892,7 +1893,9 @@ _tempfile_new(int size)
return NULL;
}
snprintf(info->filename,len,"%s/%sXXXXXX", tmppath, "elmcnpitem-");
cur_umask = umask(S_IRWXO | S_IRWXG);
info->fd = mkstemp(info->filename);
umask(cur_umask);
# ifdef __linux__
{
char *tmp;