From 42a2f7f6302589325c32989753f3d77aff1548c6 Mon Sep 17 00:00:00 2001 From: "elias.bachaalany" Date: Tue, 16 Feb 2010 15:21:49 +0000 Subject: [PATCH] bugfix: linput_t was accessing uninitialized variable in some cases --- swig/diskio.i | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/swig/diskio.i b/swig/diskio.i index 800f04f..0f70d4f 100644 --- a/swig/diskio.i +++ b/swig/diskio.i @@ -98,19 +98,10 @@ public: // class from and to IDC. The value of this variable must be set to two int __idc_cvt_id__; //-------------------------------------------------------------------------- - loader_input_t(PyObject *pycobject = NULL) + loader_input_t(PyObject *pycobject = NULL): li(NULL), own(OWN_NONE), __idc_cvt_id__(2) { - __idc_cvt_id__ = 2; // Opaque object if (pycobject != NULL && PyCObject_Check(pycobject)) - { _from_cobject(pycobject); - } - else - { - li = NULL; - own = OWN_NONE; - fn.qclear(); - } } //-------------------------------------------------------------------------- @@ -123,7 +114,7 @@ public: close_linput(li); else if (own == OWN_FROM_FP) unmake_linput(li); - + own = OWN_NONE; li = NULL; }