mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Corrected bug introduced via typo. Bug identified
by Coverity. Thanks, Coverity!
This commit is contained in:
parent
6096f6b43b
commit
ceb736c4b5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user