Bug correction : in PyBox.inflate method : third and fourth arguments were not initialized by Parse_Tuple leadding to a segmentation fault when using inflate with 4 arguments in python.

This commit is contained in:
Damien Dupuis 2011-05-30 11:22:02 +00:00
parent eff3b09d2d
commit b62e6fb0c1
1 changed files with 3 additions and 3 deletions

View File

@ -259,13 +259,13 @@ extern "C" {
PyObject* arg0; PyObject* arg0;
PyObject* arg1; PyObject* arg1;
PyObject* arg2 = NULL; PyObject* arg2;
PyObject* arg3 = NULL; PyObject* arg3;
HTRY HTRY
__cs.init ("Box.inflate"); __cs.init ("Box.inflate");
if ( ! PyArg_ParseTuple(args,"|O&O&O&O&:Box.inflate",Converter,&arg0,Converter,&arg1) ) if ( ! PyArg_ParseTuple(args,"|O&O&O&O&:Box.inflate",Converter,&arg0,Converter,&arg1,Converter,&arg2,Converter,&arg3) )
return ( NULL ); return ( NULL );
if ( __cs.getObjectIds() == INT_ARG ) { box->inflate ( PyInt_AsLong(arg0) ); } if ( __cs.getObjectIds() == INT_ARG ) { box->inflate ( PyInt_AsLong(arg0) ); }