rpms/manedit/F-9 manedit-1.1.1-fix-segv-on-refresh-with-selected.patch, NONE, 1.1 manedit-1.1.1-tmpdir.patch, 1.1, 1.2 manedit.spec, 1.22, 1.23

Mamoru Tasaka (mtasaka) fedora-extras-commits at redhat.com
Thu Jul 3 07:48:00 UTC 2008


Author: mtasaka

Update of /cvs/extras/rpms/manedit/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28687/F-9

Modified Files:
	manedit-1.1.1-tmpdir.patch manedit.spec 
Added Files:
	manedit-1.1.1-fix-segv-on-refresh-with-selected.patch 
Log Message:
* Thu Jul  3 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.1.1-2
- Modify tmpdir.patch: to fix segv on the exit of manview
- Fix segv on refresh on manview when one item is selected


manedit-1.1.1-fix-segv-on-refresh-with-selected.patch:

--- NEW FILE manedit-1.1.1-fix-segv-on-refresh-with-selected.patch ---
--- manedit-1.1.1/manedit/viewer.c.debug2	2008-07-03 15:55:10.000000000 +0900
+++ manedit-1.1.1/manedit/viewer.c	2008-07-03 16:16:24.000000000 +0900
@@ -2676,8 +2676,9 @@
 		(branch_row->parent != NULL) : FALSE;
 	    GTK_WIDGET_SET_SENSITIVE(v->index_parent_mi, sensitive);
 
+            /* sensitive may be 0 */
 	    if((v->index_ctree != NULL) &&
-	       (v->last_selected_index_node != NULL)
+	       (v->last_selected_index_node != NULL) && sensitive
 	    )
 		item = VIEWER_INDEX_ITEM(gtk_ctree_node_get_row_data(
 		    GTK_CTREE(v->index_ctree), v->last_selected_index_node
@@ -2741,8 +2742,9 @@
 	    (branch_row->parent != NULL) : FALSE;
 	GTK_WIDGET_SET_SENSITIVE(v->index_parent_btn, sensitive);
 
+        /* sensitive may be 0 */
 	if((v->index_ctree != NULL) &&
-	   (v->last_selected_index_node != NULL)
+	   (v->last_selected_index_node != NULL && sensitive)
 	)
 	    item = VIEWER_INDEX_ITEM(gtk_ctree_node_get_row_data(
 		GTK_CTREE(v->index_ctree),

manedit-1.1.1-tmpdir.patch:

Index: manedit-1.1.1-tmpdir.patch
===================================================================
RCS file: /cvs/extras/rpms/manedit/F-9/manedit-1.1.1-tmpdir.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- manedit-1.1.1-tmpdir.patch	30 Jun 2008 12:04:00 -0000	1.1
+++ manedit-1.1.1-tmpdir.patch	3 Jul 2008 07:46:32 -0000	1.2
@@ -1,5 +1,5 @@
 --- manedit-1.1.1/manedit/main.c.tmppath	2008-06-17 15:00:00.000000000 +0900
-+++ manedit-1.1.1/manedit/main.c	2008-06-30 19:23:22.000000000 +0900
++++ manedit-1.1.1/manedit/main.c	2008-07-03 16:28:49.000000000 +0900
 @@ -4,6 +4,7 @@
  #include <locale.h>
  #include <gtk/gtk.h>
@@ -8,24 +8,28 @@
  
  #include "../include/disk.h"
  #include "../include/string.h"
-@@ -199,5 +200,8 @@
+@@ -199,5 +200,12 @@
  	CDialogShutdown();
  	FPromptShutdown();
  
 +	/* clean up */
-+	rmdir (MECreateTemporaryDirectory(NULL));
++	{
++		gchar *tmpdir = MECreateTemporaryDirectory(NULL);
++		if (tmpdir) rmdir (tmpdir);
++		free(tmpdir);
++	}
 +
  	return(0);
  }
 --- manedit-1.1.1/manedit/me_op.c.tmppath	2008-06-17 15:00:00.000000000 +0900
-+++ manedit-1.1.1/manedit/me_op.c	2008-06-30 19:23:04.000000000 +0900
++++ manedit-1.1.1/manedit/me_op.c	2008-07-03 16:22:59.000000000 +0900
 @@ -1,3 +1,5 @@
 +#define _BSD_SOURCE
 +
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
-@@ -275,11 +277,18 @@
+@@ -275,11 +277,19 @@
   *	The returned pointer needs to be deleted by the calling
   *	function.
   */
@@ -40,11 +44,12 @@
 +
 +	static gchar tmp_dir_memory[TMP_DIR_MAX_LEN] = "";
 +	if (*tmp_dir_memory) return g_strdup(tmp_dir_memory);
++	if (!core) return NULL;
 +
  	CfgList *cfg_list = core->cfg_list;
  
  	/* Get the tempory directory */
-@@ -303,6 +312,7 @@
+@@ -303,6 +313,7 @@
  	    user_name = "anon";
  
  	/* Format the return temporary directory path */
@@ -52,7 +57,7 @@
  	tmp_dir_rtn = g_strconcat(
  	    tmp_path,
  	    G_DIR_SEPARATOR_S,
-@@ -328,6 +338,22 @@
+@@ -328,6 +339,22 @@
  	}
  
  	return(tmp_dir_rtn);


Index: manedit.spec
===================================================================
RCS file: /cvs/extras/rpms/manedit/F-9/manedit.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- manedit.spec	30 Jun 2008 12:04:00 -0000	1.22
+++ manedit.spec	3 Jul 2008 07:46:32 -0000	1.23
@@ -3,7 +3,7 @@
 
 Name:           manedit
 Version:        1.1.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        UNIX Manual Page Editor
 
 Group:          Development/Tools
@@ -19,6 +19,7 @@
 Patch4:		manedit-1.1.1-fix-compilation.patch
 Patch5:		manedit-1.1.1-fix-segv-on-manview.patch
 Patch6:		manedit-1.1.1-tmpdir.patch
+Patch7:		manedit-1.1.1-fix-segv-on-refresh-with-selected.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # This is gtk+ package
@@ -47,6 +48,7 @@
 %patch1 -p1 -b .manpages
 %patch5 -p1 -b .segv_manview
 %patch6 -p1 -b .tmpdir
+%patch7 -p1 -b .segv_refresh
 
 %build
 # I cannot understand this configure!!
@@ -115,6 +117,10 @@
 %{_mandir}/man1/%{name}.1*
 
 %changelog
+* Thu Jul  3 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.1.1-2
+- Modify tmpdir.patch: to fix segv on the exit of manview
+- Fix segv on refresh on manview when one item is selected
+
 * Mon Jun 30 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.1.1-1
 - 1.1.1
 - Seems that URL are moved temporarily




More information about the scm-commits mailing list