Hello community,
here is the log from the commit of package python-python-gammu for
openSUSE:Factory checked in at 2015-09-30 05:50:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-gammu (Old)
and /work/SRC/openSUSE:Factory/.python-python-gammu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-gammu"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-gammu/python-python-gammu.changes
2015-07-14 17:46:07.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python-python-gammu.new/python-python-gammu.changes
2015-09-30 05:50:32.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Sep 2 11:54:54 UTC 2015 - [email protected]
+
+- Update to 2.4:
+ * Fixed possible crash when initializing SMSD with invalid parameters.
+ * Fixed crash on handling diverts on certain architectures.
+
+-------------------------------------------------------------------
Old:
----
python-gammu-2.3.tar.bz2
New:
----
python-gammu-2.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-gammu.spec ++++++
--- /var/tmp/diff_new_pack.lwLzHg/_old 2015-09-30 05:50:33.000000000 +0200
+++ /var/tmp/diff_new_pack.lwLzHg/_new 2015-09-30 05:50:33.000000000 +0200
@@ -17,7 +17,7 @@
Name: python-python-gammu
-Version: 2.3
+Version: 2.4
Release: 0
Summary: Python module to communicate with mobile phones
License: GPL-2.0+
++++++ python-gammu-2.3.tar.bz2 -> python-gammu-2.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/NEWS.rst
new/python-gammu-2.4/NEWS.rst
--- old/python-gammu-2.3/NEWS.rst 2015-06-03 09:19:51.000000000 +0200
+++ new/python-gammu-2.4/NEWS.rst 2015-09-02 10:02:50.000000000 +0200
@@ -1,3 +1,9 @@
+2.4
+===
+
+* Fixed possible crash when initializing SMSD with invalid parameters.
+* Fixed crash on handling diverts on certain architectures.
+
2.3
===
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/PKG-INFO
new/python-gammu-2.4/PKG-INFO
--- old/python-gammu-2.3/PKG-INFO 2015-06-03 14:51:33.000000000 +0200
+++ new/python-gammu-2.4/PKG-INFO 2015-09-02 10:21:00.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-gammu
-Version: 2.3
+Version: 2.4
Summary: Gammu bindings
Home-page: http://wammu.eu/python-gammu/
Author: Michal Čihař
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/gammu/src/gammu.c
new/python-gammu-2.4/gammu/src/gammu.c
--- old/python-gammu-2.3/gammu/src/gammu.c 2015-06-03 09:03:18.000000000
+0200
+++ new/python-gammu-2.4/gammu/src/gammu.c 2015-09-02 10:12:56.000000000
+0200
@@ -3461,7 +3461,7 @@
GSM_CallDivert divert;
static char *kwlist[] = {"Divert", "Type", "Number", "Timeout",
NULL};
char *cond, *type, *number;
- size_t number_len;
+ int number_len;
divert.Timeout = 0;
@@ -5422,6 +5422,20 @@
self = (StateMachineObject *)type->tp_alloc(type, 0);
self->s = GSM_AllocStateMachine();
+ /* Reset our structures */
+ self->DebugFile = NULL;
+ self->IncomingCallback = NULL;
+
+ self->IncomingCallQueue[0] = NULL;
+ self->IncomingSMSQueue[0] = NULL;
+ self->IncomingCBQueue[0] = NULL;
+ self->IncomingUSSDQueue[0] = NULL;
+
+ /* Create phone communication lock */
+#ifdef WITH_THREAD
+ self->mutex = PyThread_allocate_lock();
+#endif
+
return (PyObject *)self;
}
@@ -5432,30 +5446,16 @@
static char *kwlist[] = {"Locale", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|s", kwlist, &s))
- return 0;
+ return -1;
if (s != NULL && strcmp(s, "auto") == 0) {
s = NULL;
}
- /* Reset our structures */
- self->DebugFile = NULL;
- self->IncomingCallback = NULL;
-
- self->IncomingCallQueue[0] = NULL;
- self->IncomingSMSQueue[0] = NULL;
- self->IncomingCBQueue[0] = NULL;
- self->IncomingUSSDQueue[0] = NULL;
-
- /* Create phone communication lock */
-#ifdef WITH_THREAD
- self->mutex = PyThread_allocate_lock();
-#endif
-
/* Init Gammu locales, we don't care about NULL, it's handled correctly */
GSM_InitLocales(s);
- return 1;
+ return 0;
}
static char StateMachineType__doc__[] =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/gammu/src/smsd.c
new/python-gammu-2.4/gammu/src/smsd.c
--- old/python-gammu-2.3/gammu/src/smsd.c 2015-06-03 09:03:47.000000000
+0200
+++ new/python-gammu-2.4/gammu/src/smsd.c 2015-09-02 09:56:02.000000000
+0200
@@ -223,13 +223,13 @@
GSM_Error error;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &s))
- return 0;
+ return -1;
error = SMSD_ReadConfig(s, self->config, TRUE);
if (!checkError(error, "SMSD_ReadConfig"))
- return 0;
+ return -1;
- return 1;
+ return 0;
}
static char SMSDType__doc__[] = "SMSD object, that is used for communication
with phone.";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/python_gammu.egg-info/PKG-INFO
new/python-gammu-2.4/python_gammu.egg-info/PKG-INFO
--- old/python-gammu-2.3/python_gammu.egg-info/PKG-INFO 2015-06-03
14:51:33.000000000 +0200
+++ new/python-gammu-2.4/python_gammu.egg-info/PKG-INFO 2015-09-02
10:21:00.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-gammu
-Version: 2.3
+Version: 2.4
Summary: Gammu bindings
Home-page: http://wammu.eu/python-gammu/
Author: Michal Čihař
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/setup.py
new/python-gammu-2.4/setup.py
--- old/python-gammu-2.3/setup.py 2015-06-03 09:27:48.000000000 +0200
+++ new/python-gammu-2.4/setup.py 2015-06-03 15:06:36.000000000 +0200
@@ -27,11 +27,13 @@
import distutils.spawn
from setuptools import setup, Extension
import os
+import codecs
# some defines
-VERSION = '2.3'
+VERSION = '2.4'
GAMMU_REQUIRED = '1.34.0'
-with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
+README_FILE = os.path.join(os.path.dirname(__file__), 'README.rst')
+with codecs.open(README_FILE, 'r', 'utf-8') as readme:
README = readme.read()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/test/test_config.py
new/python-gammu-2.4/test/test_config.py
--- old/python-gammu-2.3/test/test_config.py 2015-06-03 09:18:33.000000000
+0200
+++ new/python-gammu-2.4/test/test_config.py 2015-09-02 10:14:37.000000000
+0200
@@ -83,6 +83,9 @@
cfg = state_machine.GetConfig(0)
self.assertEqual(cfg['StartInfo'], 0)
+ def test_init_error(self):
+ self.assertRaises(TypeError, gammu.StateMachine, Bar=1)
+
class DebugTest(unittest.TestCase):
def setUp(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-gammu-2.3/test/test_smsd.py
new/python-gammu-2.4/test/test_smsd.py
--- old/python-gammu-2.3/test/test_smsd.py 2015-06-03 09:18:33.000000000
+0200
+++ new/python-gammu-2.4/test/test_smsd.py 2015-09-02 10:15:16.000000000
+0200
@@ -52,6 +52,9 @@
def get_smsd(self):
return gammu.smsd.SMSD(self.config_name)
+ def test_init_error(self):
+ self.assertRaises(TypeError, gammu.smsd.SMSD, Bar=1)
+
def test_inject(self):
smsd = self.get_smsd()
smsd.InjectSMS([MESSAGE_1])