summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jan@dittberner.info>2010-09-10 16:11:07 +0000
committerJan Dittberner <jan@dittberner.info>2010-09-10 16:11:07 +0000
commit7e9dbf6ad50792981852af80733de67061e775ab (patch)
tree8b1a4538789f0f52fae0aeb6cca906141c3e2db7
parente04b1db64e2e5b9fbc53c8ad7bdf1fd876a72899 (diff)
downloadcracklib-7e9dbf6ad50792981852af80733de67061e775ab.tar.gz
Fix a segmentation fault in the Python extension by initializing *defaultdict
with NULL. Thanks for Peter Palfrader for the patch in the Debian BTS. git-svn-id: file:///tmp/cracklib-svn/trunk/cracklib@172 4175fe1e-86d5-4fdc-8e6a-506fab9d8533
-rw-r--r--NEWS5
-rw-r--r--python/Makefile.am2
-rw-r--r--python/_cracklibmodule.c3
3 files changed, 6 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index e06ec02..86a1587 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
-v2.8.18 fixed compilation on interix systems
+v2.8.17 fixed compilation on interix systems
updated Hindi translation (Rajesh Ranjan)
-v2.8.17 fixed NLS issue in cracklib-check
+ fixed NLS issue in cracklib-check
add Ukrainian translation (Yuri Chornoivan)
+ fix segmentation fault in Python extension (Peter Palfrader)
v2.8.16 update licensing information in Python extension (Jan Dittberner)
make translations work in Python extension (Jan Dittberner)
fix Python extension compilation warning (Jan Dittberner)
diff --git a/python/Makefile.am b/python/Makefile.am
index c70e76d..499ff90 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -1,7 +1,7 @@
if BUILD_PYTHON
python_PYTHON = cracklib.py
pyexec_LTLIBRARIES = _cracklibmodule.la
-AM_CFLAGS = -I$(top_srcdir)/lib
+AM_CFLAGS = -I$(top_srcdir)/lib -Wall
_cracklibmodule_la_LDFLAGS = -module -avoid-version $(top_builddir)/lib/libcrack.la
DEFS += '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"'
DEFS += '-DPYTHON_H="python@PYTHON_VERSION@/Python.h"'
diff --git a/python/_cracklibmodule.c b/python/_cracklibmodule.c
index e6519e2..b94825c 100644
--- a/python/_cracklibmodule.c
+++ b/python/_cracklibmodule.c
@@ -64,7 +64,8 @@ static char _cracklib_FascistCheck_doc [] =
static PyObject *
_cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs)
{
- char *candidate, *dict, *defaultdict;
+ char *candidate, *dict;
+ char *defaultdict = NULL;
const char *result;
struct stat st;
char *keywords[] = {"pw", "dictpath", NULL};