bugfix
This commit is contained in:
@ -411,14 +411,14 @@ static int printObjectPar(SConnection *pCon,SicsInterp *pSics, char *obj){
|
||||
SCWrite(pCon,"ERROR: failed to open tmpfile",eError);
|
||||
return 0;
|
||||
}
|
||||
buffer = (char *)malloc(length*sizeof(char));
|
||||
buffer = malloc(length+1);
|
||||
if(buffer == NULL){
|
||||
SCWrite(pCon,"ERROR: out of memory in list par",eError);
|
||||
fclose(fd);
|
||||
unlink(tmpfile);
|
||||
return 0;
|
||||
}
|
||||
memset(buffer,0,length*sizeof(char));
|
||||
memset(buffer,0,length+1);
|
||||
fread(buffer,length,1,fd);
|
||||
fclose(fd);
|
||||
SCWrite(pCon,buffer,eValue);
|
||||
|
Reference in New Issue
Block a user