diff --git a/man-db-2.6.3.dif b/man-db-2.6.3.dif index 23f4819..ab8b8dd 100644 --- a/man-db-2.6.3.dif +++ b/man-db-2.6.3.dif @@ -1,5 +1,5 @@ --- configure.ac -+++ configure.ac 2008-08-12 13:32:24.000000000 +0000 ++++ configure.ac 2012-10-09 15:25:13.090345177 +0000 @@ -316,6 +316,14 @@ then fi @@ -33,41 +33,8 @@ if test -z "$gzip" then compressor="$compress -c" ---- mk_catdirs -+++ mk_catdirs 2009-08-03 11:22:19.000000000 +0000 -@@ -0,0 +1,30 @@ -+#!/bin/sh -+ -+OLDPWD="`pwd`" -+CACHE="$1/var/cache/man" -+ -+ cats="cat{0,1,2,3,4,5,6,7,8,9,n}" -+locale="{ca,cs,da,de,en,es,et,fi,fr,ga,hu,is,it,ja,ko,nl,no,pl,pt,ru,sk,sr,sv,uk}" -+ dirs="{local,opt}" -+ -+umask 022 -+test -d ${CACHE} && rm -rf ${CACHE} -+mkdir -p ${CACHE} -+ -+catman=false -+grep -qE '#[[:blank:]]*define[[:blank:]]+MAN_CATS' include/manconfig.h && catman=true -+cd ${CACHE} -+if $catman ; then -+ eval echo ${cats} \ -+ ${locale}/${cats} \ -+ ${dirs}/${cats} \ -+ ${dirs}/${locale}/${cats} -+else -+ eval echo ${locale} \ -+ ${dirs} \ -+ ${dirs}/${locale} -+fi | xargs mkdir -p -+sync -+cd ${OLDPWD} -+ -+test "$(id -u)" -ne 0 || chown man:man -R ${CACHE} --- include/comp_src.h.in -+++ include/comp_src.h.in 2007-12-10 11:51:50.000000000 +0000 ++++ include/comp_src.h.in 2012-10-09 15:25:13.266345026 +0000 @@ -53,7 +53,7 @@ struct compression comp_list[] = { #endif /* HAVE_GZIP */ @@ -78,7 +45,7 @@ /* Else if we have gzip, incorporate the following */ #elif defined (HAVE_GZIP) --- lib/security.c -+++ lib/security.c 2012-10-02 14:06:34.011008327 +0000 ++++ lib/security.c 2012-10-09 15:25:13.374643928 +0000 @@ -60,7 +60,10 @@ uid_t ruid; /* initial real user id */ @@ -142,7 +109,7 @@ } --- lib/util.c -+++ lib/util.c 2007-12-10 12:24:30.000000000 +0000 ++++ lib/util.c 2012-10-09 15:25:13.482578481 +0000 @@ -46,6 +46,9 @@ #include "gettext.h" @@ -154,7 +121,7 @@ #include "error.h" --- libdb/mydbm.h -+++ libdb/mydbm.h 2012-10-02 10:58:42.259008074 +0000 ++++ libdb/mydbm.h 2012-10-09 15:25:13.574993382 +0000 @@ -42,7 +42,7 @@ # include @@ -173,8 +140,41 @@ # define MYDBM_RWOPEN(file) btree_flopen(file, O_RDWR, DBMODE) # define MYDBM_RDOPEN(file) btree_flopen(file, O_RDONLY, DBMODE) # define MYDBM_INSERT(db, key, cont) btree_insert(db, key, cont) +--- mk_catdirs ++++ mk_catdirs 2012-10-09 15:25:13.182344989 +0000 +@@ -0,0 +1,30 @@ ++#!/bin/sh ++ ++OLDPWD="`pwd`" ++CACHE="$1/var/cache/man" ++ ++ cats="cat{0,1,2,3,4,5,6,7,8,9,n}" ++locale="{ca,cs,da,de,en,es,et,fi,fr,ga,hu,is,it,ja,ko,nl,no,pl,pt,ru,sk,sr,sv,uk}" ++ dirs="{local,opt}" ++ ++umask 022 ++test -d ${CACHE} && rm -rf ${CACHE} ++mkdir -p ${CACHE} ++ ++catman=false ++grep -qE '#[[:blank:]]*define[[:blank:]]+MAN_CATS' include/manconfig.h && catman=true ++cd ${CACHE} ++if $catman ; then ++ eval echo ${cats} \ ++ ${locale}/${cats} \ ++ ${dirs}/${cats} \ ++ ${dirs}/${locale}/${cats} ++else ++ eval echo ${locale} \ ++ ${dirs} \ ++ ${dirs}/${locale} ++fi | xargs mkdir -p ++sync ++cd ${OLDPWD} ++ ++test "$(id -u)" -ne 0 || chown man:man -R ${CACHE} --- src/Makefile.am -+++ src/Makefile.am 2012-10-02 15:19:49.371507288 +0000 ++++ src/Makefile.am 2012-10-09 15:25:13.666345062 +0000 @@ -167,15 +167,9 @@ apropos$(EXEEXT): whatis$(EXEEXT) all-am: apropos$(EXEEXT) @@ -195,7 +195,7 @@ install-data-hook: @if test -f $(DESTDIR)$(config_file); then \ --- src/check_mandirs.c -+++ src/check_mandirs.c 2012-10-02 15:24:45.411047275 +0000 ++++ src/check_mandirs.c 2012-10-09 15:25:13.758815292 +0000 @@ -354,10 +354,13 @@ static inline void add_dir_entries (cons #ifdef SECURE_MAN_UID @@ -316,7 +316,7 @@ content = MYDBM_FETCH (dbf, key); if (!MYDBM_DPTR (content)) { --- src/descriptions_store.c -+++ src/descriptions_store.c 2012-10-02 12:54:25.459006524 +0000 ++++ src/descriptions_store.c 2012-10-09 15:25:13.842344839 +0000 @@ -71,7 +71,7 @@ void store_descriptions (const struct pa if (trace) { @@ -327,7 +327,7 @@ } --- src/lexgrog.l -+++ src/lexgrog.l 2012-10-02 11:15:05.159007312 +0000 ++++ src/lexgrog.l 2012-10-09 15:25:13.934344902 +0000 @@ -56,7 +56,7 @@ #include "manconv_client.h" @@ -631,7 +631,7 @@ if (p_lg->type) BEGIN (CAT_FILE); --- src/man.c -+++ src/man.c 2012-10-02 13:39:15.135007300 +0000 ++++ src/man.c 2012-10-09 15:26:50.654659512 +0000 @@ -68,6 +68,7 @@ static char *cwd; #include #include @@ -746,19 +746,22 @@ return NOT_FOUND; } -@@ -1000,8 +1001,10 @@ executable_out: +@@ -1000,8 +1001,13 @@ executable_out: argv_abs = xstrdup (argv); } lang = lang_dir (argv_abs); -+ if (!lang || !*lang) -+ lang = internal_locale; ++ if (!lang || !*lang) { ++ if (lang) ++ free(lang); ++ lang = xstrdup(internal_locale); ++ } free (argv_abs); - if (!display (NULL, argv, NULL, argv_base, NULL)) { + if (!display (NULL, file, NULL, argv_base, NULL)) { if (local_mf) error (0, errno, "%s", argv); exit_status = NOT_FOUND; -@@ -1030,7 +1033,16 @@ int main (int argc, char *argv[]) +@@ -1030,7 +1036,16 @@ int main (int argc, char *argv[]) umask (022); init_locale (); @@ -776,7 +779,7 @@ /* Use LANGUAGE only when LC_MESSAGES locale category is * neither "C" nor "POSIX". */ if (internal_locale && strcmp (internal_locale, "C") && -@@ -1095,9 +1107,13 @@ int main (int argc, char *argv[]) +@@ -1095,9 +1110,13 @@ int main (int argc, char *argv[]) if (external) do_extern (argc, argv); @@ -791,7 +794,7 @@ #endif /* SECURE_MAN_UID */ /* close this locale and reinitialise if a new locale was -@@ -1400,7 +1416,8 @@ static const char *get_preprocessors_fro +@@ -1400,7 +1419,8 @@ static const char *get_preprocessors_fro if (!line) return NULL; @@ -801,7 +804,7 @@ const char *newline = strchr (line, '\n'); if (newline) directive = xstrndup (line + 4, newline - (line + 4)); -@@ -1917,6 +1934,18 @@ static void setenv_less (pipecmd *cmd, c +@@ -1917,6 +1937,18 @@ static void setenv_less (pipecmd *cmd, c free (less_opts); } @@ -820,7 +823,7 @@ static void add_output_iconv (pipeline *p, const char *source, const char *target) { -@@ -1972,6 +2001,8 @@ static pipeline *make_display_command (c +@@ -1972,6 +2004,8 @@ static pipeline *make_display_command (c if (pager_cmd) { setenv_less (pager_cmd, title); @@ -829,7 +832,7 @@ pipeline_command (p, pager_cmd); } pipeline_ignore_signals (p, 1); -@@ -1982,7 +2013,7 @@ static pipeline *make_display_command (c +@@ -1982,7 +2016,7 @@ static pipeline *make_display_command (c return p; } @@ -838,7 +841,7 @@ /* return a (malloced) temporary name in cat_file's directory */ static char *tmp_cat_filename (const char *cat_file) { -@@ -2084,6 +2115,7 @@ static int commit_tmp_cat (const char *c +@@ -2084,6 +2118,7 @@ static int commit_tmp_cat (const char *c return status; } @@ -846,7 +849,7 @@ /* TODO: This should all be refactored after work on the decompression * library is complete. -@@ -2104,7 +2136,6 @@ static void maybe_discard_stderr (pipeli +@@ -2104,7 +2139,6 @@ static void maybe_discard_stderr (pipeli } #ifdef MAN_CATS @@ -854,7 +857,7 @@ /* Return pipeline to write formatted manual page to for saving as cat file. */ static pipeline *open_cat_stream (const char *cat_file, const char *encoding) { -@@ -2338,6 +2369,7 @@ static void format_display (pipeline *de +@@ -2338,6 +2372,7 @@ static void format_display (pipeline *de regain_effective_privs (); } @@ -862,7 +865,7 @@ /* "Display" a page in catman mode, which amounts to saving it. */ /* TODO: merge with format_display_and_save? */ static void display_catman (const char *cat_file, pipeline *decomp, -@@ -2377,6 +2409,7 @@ static void display_catman (const char * +@@ -2377,6 +2412,7 @@ static void display_catman (const char * pop_cleanup(); free (tmpcat); } @@ -870,7 +873,7 @@ static void disable_hyphenation (void *data ATTRIBUTE_UNUSED) { -@@ -2529,7 +2562,7 @@ static int display (const char *dir, con +@@ -2529,7 +2565,7 @@ static int display (const char *dir, con format_cmd = NULL; decomp_errno = errno; } @@ -879,7 +882,7 @@ /* Get modification time, for commit_tmp_cat(). */ if (man_file && *man_file) { struct stat stb; -@@ -2538,7 +2571,7 @@ static int display (const char *dir, con +@@ -2538,7 +2574,7 @@ static int display (const char *dir, con else man_modtime = stb.st_mtime; } @@ -888,7 +891,7 @@ display_to_stdout = troff; #ifdef TROFF_IS_GROFF if (htmlout) -@@ -2673,6 +2706,7 @@ static int display (const char *dir, con +@@ -2673,6 +2709,7 @@ static int display (const char *dir, con } if (printed) putchar ('\n'); @@ -896,7 +899,7 @@ } else if (catman) { if (format) { if (!save_cat) -@@ -2685,6 +2719,7 @@ static int display (const char *dir, con +@@ -2685,6 +2722,7 @@ static int display (const char *dir, con format_cmd, formatted_encoding); } @@ -904,7 +907,7 @@ } else if (format) { /* no cat or out of date */ pipeline *disp_cmd; -@@ -2743,8 +2778,10 @@ static int display (const char *dir, con +@@ -2743,8 +2781,10 @@ static int display (const char *dir, con } } @@ -917,7 +920,7 @@ if (!prompt) prompt = found; -@@ -2752,7 +2789,6 @@ static int display (const char *dir, con +@@ -2752,7 +2792,6 @@ static int display (const char *dir, con return found; } @@ -925,7 +928,7 @@ static char *find_cat_file (const char *path, const char *original, const char *man_file) { -@@ -3486,7 +3522,7 @@ static int display_database_check (struc +@@ -3486,7 +3525,7 @@ static int display_database_check (struc #ifdef MAN_DB_UPDATES if (!exists && !skip) { debug ("dbdelete_wrapper (%s, %p)\n", @@ -935,7 +938,7 @@ } #endif /* MAN_DB_UPDATES */ --- src/man_db.conf.in -+++ src/man_db.conf.in 2008-08-12 13:35:48.000000000 +0000 ++++ src/man_db.conf.in 2012-10-09 15:25:14.146344181 +0000 @@ -20,6 +20,14 @@ MANDATORY_MANPATH /usr/man MANDATORY_MANPATH /usr/share/man @@ -1104,7 +1107,7 @@ #--------------------------------------------------------- # Program definitions. These are commented out by default as the value --- src/mandb.c -+++ src/mandb.c 2012-10-02 15:26:11.359507056 +0000 ++++ src/mandb.c 2012-10-09 15:25:14.270344007 +0000 @@ -193,6 +193,8 @@ static const char *xtmpfile; #ifdef SECURE_MAN_UID extern uid_t ruid; @@ -1159,7 +1162,7 @@ read_config_file (user); --- src/manp.c -+++ src/manp.c 2012-10-02 14:10:25.187007537 +0000 ++++ src/manp.c 2012-10-09 15:25:14.378344409 +0000 @@ -907,7 +907,7 @@ static char *def_path (int flag) /* If we have complete config file failure... */ @@ -1170,7 +1173,7 @@ return manpath; } --- src/straycats.c -+++ src/straycats.c 2008-08-12 14:59:19.000000000 +0000 ++++ src/straycats.c 2012-10-09 15:25:14.486844509 +0000 @@ -36,6 +36,7 @@ #include #include @@ -1202,7 +1205,7 @@ closedir (cdir); return strays; --- src/ult_src.c -+++ src/ult_src.c 2007-12-10 13:34:00.000000000 +0000 ++++ src/ult_src.c 2012-10-09 15:25:14.610345084 +0000 @@ -326,12 +326,17 @@ const char *ult_src (const char *name, c } pipeline_start (decomp); @@ -1225,7 +1228,7 @@ if (include) { const char *ult; --- src/ult_src.h -+++ src/ult_src.h 2007-12-10 12:24:30.000000000 +0000 ++++ src/ult_src.h 2012-10-09 15:25:14.714345027 +0000 @@ -22,9 +22,10 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/man.changes b/man.changes index 9b785c1..70a4702 100644 --- a/man.changes +++ b/man.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 9 15:20:03 UTC 2012 - werner@suse.de + +- Avoid double free of pointer internal_locale due dup onto + pointer lang + ------------------------------------------------------------------- Thu Oct 4 09:16:16 UTC 2012 - werner@suse.de diff --git a/man.spec b/man.spec index 1a9ea12..c1df120 100644 --- a/man.spec +++ b/man.spec @@ -81,7 +81,7 @@ Authors: %patch7 -p0 -b .chinese %patch9 -p0 -b .zio %patch10 -p0 -b .listall -%patch0 -p0 +%patch0 -p0 -b .0 %build gettextize --force --copy --no-changelog