From 3a23ca52238c4294e730ace9153d98c2b1504274 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Fri, 10 Sep 2010 16:11:07 +0000 Subject: [PATCH] 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@172 4175fe1e-86d5-4fdc-8e6a-506fab9d8533 --- cracklib/NEWS | 5 +++-- cracklib/python/Makefile.am | 2 +- cracklib/python/_cracklibmodule.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cracklib/NEWS b/cracklib/NEWS index e06ec02..86a1587 100644 --- a/cracklib/NEWS +++ b/cracklib/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/cracklib/python/Makefile.am b/cracklib/python/Makefile.am index c70e76d..499ff90 100644 --- a/cracklib/python/Makefile.am +++ b/cracklib/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/cracklib/python/_cracklibmodule.c b/cracklib/python/_cracklibmodule.c index e6519e2..b94825c 100644 --- a/cracklib/python/_cracklibmodule.c +++ b/cracklib/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}; -- 2.40.0