Corrected bug introduced via typo. Bug identified

by Coverity. Thanks, Coverity!
This commit is contained in:
Ward Fisher 2013-03-14 23:23:36 +00:00
parent 6096f6b43b
commit ceb736c4b5

View File

@ -365,7 +365,7 @@ createtempfile1(char* tmppath, char** tmpnamep)
int fd = 0;
char* tmpname = NULL;
size_t tmpsize = strlen(tmppath)+strlen("dataddsXXXXXX") + 1;
tmpname = (char*)alloca(tmpsize);
tmpname = (char*)malloc(tmpsize);
if(tmpname == NULL) return -1;
if(!occopycat(tmpname,tmpsize,1,tmppath))
return OC_EOVERRUN;