This commit is contained in:
Dennis Heimbigner 2012-12-07 00:23:50 +00:00
parent c114861e68
commit c684a02d87

View File

@ -348,7 +348,7 @@ createtempfile1(char* tmppath, char** tmpnamep)
if(tmpname == NULL) return -1; if(tmpname == NULL) return -1;
strncpy(tmpname,tmppath,tmpsize); strncpy(tmpname,tmppath,tmpsize);
#ifdef HAVE_MKSTEMP #ifdef HAVE_MKSTEMP
strncat(tmpname,"dataddsXXXXXX",strlen("dataddsXXXXXX"))); strncat(tmpname,"dataddsXXXXXX",strlen("dataddsXXXXXX"));
/* Note Potential problem: old versions of this function /* Note Potential problem: old versions of this function
leave the file in mode 0666 instead of 0600 */ leave the file in mode 0666 instead of 0600 */
fd = mkstemp(tmpname); fd = mkstemp(tmpname);