Hi, Revision 1.4 of x11/windowmaker/patches/patch-WINGs_string_c uncovered a bug in WPrefs, WindowMaker's configuration tool. The bug can be easily triggered by choosing the 'Applications Menu Definition' dialogue.
The problem is that WPrefs code relied on the fact that the first token in the array would not be free'd by wtokenfree(), a misbehaviour which was correctly addressed in the aforementioned change. A proposed fix follows. -p. Index: Makefile =================================================================== RCS file: /cvs/ports/x11/windowmaker/Makefile,v retrieving revision 1.71 diff -u -r1.71 Makefile --- Makefile 25 Apr 2007 11:47:52 -0000 1.71 +++ Makefile 17 Aug 2007 17:03:55 -0000 @@ -5,7 +5,7 @@ V= 0.92.0 DISTNAME= WindowMaker-${V} -PKGNAME-main= ${DISTNAME:L}p6 +PKGNAME-main= ${DISTNAME:L}p7 FULLPKGNAME-lang= windowmaker-lang-${V}p1 SHARED_LIBS= wraster 5.0 CATEGORIES= x11 x11/windowmaker Index: patches/patch-WPrefs_app_Menu_c =================================================================== RCS file: /cvs/ports/x11/windowmaker/patches/patch-WPrefs_app_Menu_c,v retrieving revision 1.3 diff -u -r1.3 patch-WPrefs_app_Menu_c --- patches/patch-WPrefs_app_Menu_c 1 Nov 2005 17:28:34 -0000 1.3 +++ patches/patch-WPrefs_app_Menu_c 17 Aug 2007 17:03:55 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-WPrefs_app_Menu_c,v 1.3 2005/11/01 17:28:34 wilfried Exp $ --- WPrefs.app/Menu.c.orig Tue Oct 26 04:23:39 2004 -+++ WPrefs.app/Menu.c Mon Oct 31 18:55:49 2005 ++++ WPrefs.app/Menu.c Fri Aug 17 20:58:09 2007 @@ -577,7 +577,7 @@ createPanel(_Panel *p) data->param.exec.command = "xv"; @@ -19,3 +19,11 @@ data->param.directory.stripExt = 1; data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)")); +@@ -1068,7 +1068,6 @@ parseCommand(WMPropList *item) + + for (i = 0, j = 0; i < tokn; i++) { + if (strcmp(tokens[i], "-noext") == 0) { +- wfree(tokens[i]); + data->param.directory.stripExt = 1; + } else { + ctokens[j++] = tokens[i];