Karsten Hopp b9d77f
To: vim-dev@vim.org
Karsten Hopp b9d77f
Subject: Patch 7.2.319
Karsten Hopp b9d77f
Fcc: outbox
Karsten Hopp b9d77f
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp b9d77f
Mime-Version: 1.0
Karsten Hopp b9d77f
Content-Type: text/plain; charset=UTF-8
Karsten Hopp b9d77f
Content-Transfer-Encoding: 8bit
Karsten Hopp b9d77f
------------
Karsten Hopp b9d77f
Karsten Hopp b9d77f
Patch 7.2.319
Karsten Hopp b9d77f
Problem:    Motif: accessing freed memory when cancelling font dialog.
Karsten Hopp b9d77f
Solution:   Destroy the widget only after accessing it. (Dominique Pelle)
Karsten Hopp b9d77f
Files:	    src/gui_xmdlg.c
Karsten Hopp b9d77f
Karsten Hopp b9d77f
Karsten Hopp b9d77f
*** ../vim-7.2.318/src/gui_xmdlg.c	2009-11-03 12:53:44.000000000 +0100
Karsten Hopp b9d77f
--- src/gui_xmdlg.c	2009-12-16 18:39:21.000000000 +0100
Karsten Hopp b9d77f
***************
Karsten Hopp b9d77f
*** 1274,1286 ****
Karsten Hopp b9d77f
  	XtAppProcessEvent(XtWidgetToApplicationContext(data->dialog),
Karsten Hopp b9d77f
  							(XtInputMask)XtIMAll);
Karsten Hopp b9d77f
  
Karsten Hopp b9d77f
-     XtDestroyWidget(data->dialog);
Karsten Hopp b9d77f
- 
Karsten Hopp b9d77f
      if (data->old)
Karsten Hopp b9d77f
      {
Karsten Hopp b9d77f
  	XFreeFont(XtDisplay(data->dialog),  data->old);
Karsten Hopp b9d77f
  	XmFontListFree(data->old_list);
Karsten Hopp b9d77f
      }
Karsten Hopp b9d77f
  
Karsten Hopp b9d77f
      gui_motif_synch_fonts();
Karsten Hopp b9d77f
  
Karsten Hopp b9d77f
--- 1274,1285 ----
Karsten Hopp b9d77f
  	XtAppProcessEvent(XtWidgetToApplicationContext(data->dialog),
Karsten Hopp b9d77f
  							(XtInputMask)XtIMAll);
Karsten Hopp b9d77f
  
Karsten Hopp b9d77f
      if (data->old)
Karsten Hopp b9d77f
      {
Karsten Hopp b9d77f
  	XFreeFont(XtDisplay(data->dialog),  data->old);
Karsten Hopp b9d77f
  	XmFontListFree(data->old_list);
Karsten Hopp b9d77f
      }
Karsten Hopp b9d77f
+     XtDestroyWidget(data->dialog);
Karsten Hopp b9d77f
  
Karsten Hopp b9d77f
      gui_motif_synch_fonts();
Karsten Hopp b9d77f
  
Karsten Hopp b9d77f
*** ../vim-7.2.318/src/version.c	2009-12-16 18:27:29.000000000 +0100
Karsten Hopp b9d77f
--- src/version.c	2009-12-16 18:40:06.000000000 +0100
Karsten Hopp b9d77f
***************
Karsten Hopp b9d77f
*** 683,684 ****
Karsten Hopp b9d77f
--- 683,686 ----
Karsten Hopp b9d77f
  {   /* Add new patch number below this line */
Karsten Hopp b9d77f
+ /**/
Karsten Hopp b9d77f
+     319,
Karsten Hopp b9d77f
  /**/
Karsten Hopp b9d77f
Karsten Hopp b9d77f
-- 
Karsten Hopp b9d77f
hundred-and-one symptoms of being an internet addict:
Karsten Hopp b9d77f
37. You start looking for hot HTML addresses in public restrooms.
Karsten Hopp b9d77f
Karsten Hopp b9d77f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp b9d77f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp b9d77f
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp b9d77f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///