From 9822669369791ba1427243fbe10a152820e22a3d Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Mon, 8 Apr 2013 14:43:13 +0200 Subject: [PATCH] - resolves: #948695 fixed double free --- man-db-2.6.3-valgrind.patch | 25 ++++++++++++------------- man-db.spec | 6 +++++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/man-db-2.6.3-valgrind.patch b/man-db-2.6.3-valgrind.patch index 812c750..bb6a9d2 100644 --- a/man-db-2.6.3-valgrind.patch +++ b/man-db-2.6.3-valgrind.patch @@ -1,6 +1,6 @@ diff -up man-db-2.6.3/lib/encodings.c.valgrind-mem man-db-2.6.3/lib/encodings.c ---- man-db-2.6.3/lib/encodings.c.valgrind-mem 2013-03-21 12:14:17.531719767 +0100 -+++ man-db-2.6.3/lib/encodings.c 2013-03-21 12:14:17.546719544 +0100 +--- man-db-2.6.3/lib/encodings.c.valgrind-mem 2013-04-05 18:19:01.402892699 +0200 ++++ man-db-2.6.3/lib/encodings.c 2013-04-05 18:19:01.419892450 +0200 @@ -559,6 +559,7 @@ const char *get_locale_charset (void) /* Restore LC_CTYPE to its value on entry to this function. */ @@ -31,8 +31,8 @@ diff -up man-db-2.6.3/lib/encodings.c.valgrind-mem man-db-2.6.3/lib/encodings.c return locale; } diff -up man-db-2.6.3/src/check_mandirs.c.valgrind-mem man-db-2.6.3/src/check_mandirs.c ---- man-db-2.6.3/src/check_mandirs.c.valgrind-mem 2013-03-21 12:14:17.543719588 +0100 -+++ man-db-2.6.3/src/check_mandirs.c 2013-03-21 12:14:17.547719529 +0100 +--- man-db-2.6.3/src/check_mandirs.c.valgrind-mem 2013-04-05 18:19:01.415892509 +0200 ++++ man-db-2.6.3/src/check_mandirs.c 2013-04-05 18:19:01.420892435 +0200 @@ -442,6 +442,7 @@ static int testmandirs (const char *path if (chdir (path) != 0) { @@ -65,7 +65,7 @@ diff -up man-db-2.6.3/src/check_mandirs.c.valgrind-mem man-db-2.6.3/src/check_ma diff -up man-db-2.6.3/src/manconv_client.c.valgrind-mem man-db-2.6.3/src/manconv_client.c --- man-db-2.6.3/src/manconv_client.c.valgrind-mem 2011-01-04 04:04:50.000000000 +0100 -+++ man-db-2.6.3/src/manconv_client.c 2013-03-21 12:14:17.548719514 +0100 ++++ man-db-2.6.3/src/manconv_client.c 2013-04-05 18:40:45.360739910 +0200 @@ -111,8 +111,10 @@ void add_manconv (pipeline *p, const cha char *name; pipecmd *cmd; @@ -79,8 +79,8 @@ diff -up man-db-2.6.3/src/manconv_client.c.valgrind-mem man-db-2.6.3/src/manconv /* informational only; no shell quoting concerns */ name = appendstr (NULL, MANCONV, " -f ", NULL); diff -up man-db-2.6.3/src/man.c.valgrind-mem man-db-2.6.3/src/man.c ---- man-db-2.6.3/src/man.c.valgrind-mem 2013-03-21 12:14:17.536719693 +0100 -+++ man-db-2.6.3/src/man.c 2013-03-21 15:18:53.182891340 +0100 +--- man-db-2.6.3/src/man.c.valgrind-mem 2013-04-05 18:19:01.408892611 +0200 ++++ man-db-2.6.3/src/man.c 2013-04-05 18:40:56.233580113 +0200 @@ -188,7 +188,7 @@ static char *manpathlist[MAXDIRS]; /* globals */ int quiet = 1; @@ -278,19 +278,18 @@ diff -up man-db-2.6.3/src/man.c.valgrind-mem man-db-2.6.3/src/man.c if (catpath) { database = mkdbname (catpath); free (catpath); -@@ -3942,7 +3986,8 @@ static int man (const char *name, int *f +@@ -3942,7 +3986,7 @@ static int man (const char *name, int *f for (cand = candidates; cand; cand = candnext) { candnext = cand->next; - free (cand); -+ free_mandata_struct (cand->source); + free_candidate (cand); } return *found ? OK : NOT_FOUND; diff -up man-db-2.6.3/src/mandb.c.valgrind-mem man-db-2.6.3/src/mandb.c --- man-db-2.6.3/src/mandb.c.valgrind-mem 2012-02-21 12:15:11.000000000 +0100 -+++ man-db-2.6.3/src/mandb.c 2013-03-21 12:14:17.552719454 +0100 ++++ man-db-2.6.3/src/mandb.c 2013-04-05 18:19:01.425892362 +0200 @@ -247,7 +247,7 @@ static int xcopy (const char *from, cons } @@ -301,8 +300,8 @@ diff -up man-db-2.6.3/src/mandb.c.valgrind-mem man-db-2.6.3/src/mandb.c if (in > 0) { if (fwrite (buf, 1, in, ofp) == 0 && ferror (ofp)) { diff -up man-db-2.6.3/src/manp.c.valgrind-mem man-db-2.6.3/src/manp.c ---- man-db-2.6.3/src/manp.c.valgrind-mem 2013-03-21 12:14:17.540719633 +0100 -+++ man-db-2.6.3/src/manp.c 2013-03-21 12:14:17.553719440 +0100 +--- man-db-2.6.3/src/manp.c.valgrind-mem 2013-04-05 18:19:01.412892553 +0200 ++++ man-db-2.6.3/src/manp.c 2013-04-05 18:19:01.428892318 +0200 @@ -504,6 +504,7 @@ static char *get_nls_manpath (const char closedir (mandir); @@ -333,7 +332,7 @@ diff -up man-db-2.6.3/src/manp.c.valgrind-mem man-db-2.6.3/src/manp.c static void free_config_file (void *unused ATTRIBUTE_UNUSED) diff -up man-db-2.6.3/src/whatis.c.valgrind-mem man-db-2.6.3/src/whatis.c --- man-db-2.6.3/src/whatis.c.valgrind-mem 2012-06-18 12:23:37.000000000 +0200 -+++ man-db-2.6.3/src/whatis.c 2013-03-21 12:14:17.556719395 +0100 ++++ man-db-2.6.3/src/whatis.c 2013-04-05 18:19:01.429892304 +0200 @@ -501,7 +501,7 @@ static inline int do_whatis_section (con static int suitable_manpath (const char *manpath, const char *page_dir) diff --git a/man-db.spec b/man-db.spec index c4fb493..6e2c1bd 100644 --- a/man-db.spec +++ b/man-db.spec @@ -4,7 +4,7 @@ Summary: Tools for searching and reading man pages Name: man-db Version: 2.6.3 -Release: 5%{?dist} +Release: 6%{?dist} # GPLv2+ .. man-db # GPLv3+ .. gnulib License: GPLv2+ and GPLv3+ @@ -132,6 +132,10 @@ install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/man-db %lang(it) %{_datadir}/man/it/man*/* %changelog +* Mon Apr 8 2013 Peter Schiffer - 2.6.3-6 +- resolves: #948695 + fixed double free + * Thu Mar 21 2013 Peter Schiffer - 2.6.3-5 - temporarily disabled one unstable unit test