Go to file
Doug Torrance 3b000774cc wmbiff: Manually copy mailbox path.
Patch by Demi <m@tfiu.de> to fix Debian bug #621690.

From https://bugs.debian.org/621690:

> wmbiff change path of my mailboxes next nearest.
>
> For example wmbiff change 'gleb' to 'glil' for second and fourth mailboxes.
> However the 1st, 3rd and 5th mailboxes have correct path.

Well, the indices don't really enter.  I'm actually surprised this
isn't more trouble.

The underlying reason is that in wmbiff.c:parse_mbox_path, the
program calls

  mboxCreate((&mbox[item]), mbox[item].path);

which for maildirs calls

  int maildirCreate(Pop3 pc, const char *str)

in maildirClient.c.  str in this way is an alias for pc->path.

In maildirCreate, after some char acrobatics, the program eventually
does

  strncpy(pc->path, str + 8 + i, BUF_BIG - 1);

to cut off the leading stuff from the maildir.  The result of this
operation is not defined, as pc->path and str point to the same
memory and thus the arguments overlap, which strncpy outlaws.

A simple fix is to copy manually, like this:

		DM(pc, DEBUG_ERROR, "maildir '%s' is too long.\n", str + 8 + i);
		memset(pc->path, 0, BUF_BIG);
	} else {
+		const char *sp = str + 8 + i;
+		char *dp = pc->path;
+
+		while (*sp && sp-str<BUF_BIG-1) {
+			*dp++ = *sp++;
+		}
+		*dp = 0;
-		strncpy(pc->path, , BUF_BIG - 1);	/* cut off ``maildir:'' */
	}

-- it's what I'm doing now.  But I give you that's a bit pedestrian.
2017-06-24 17:07:02 +01:00
AlsaMixer.app Keep mute state from getting out of sync with reality 2014-12-04 10:18:32 +00:00
asbeats asbeats: Add format string to fprintf(). 2017-02-21 14:35:02 +00:00
ascd Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
cnslock cnslock: Bump to version 1.03. 2017-02-28 10:38:00 +00:00
libdockapp libdockapp: Don't withdraw dockapps in windowed mode. 2017-04-27 11:29:10 +01:00
pclock Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
Temperature.app Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
washerdryer washerdryer: Use wmgeneral from libdockapp. 2017-02-28 10:39:21 +00:00
wmacpi wmacpi: Update header file location. 2015-10-21 09:07:01 -04:00
wmacpiload Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmail wmail: Specify libdockapper header file directory. 2017-02-28 10:39:21 +00:00
wmappkill wmappkill: Use g_free from glib instead of glibtop_free. 2017-02-28 10:39:21 +00:00
wmbatteries Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmbattery wmbattery: Bump to version 2.50. 2015-08-30 21:24:10 +01:00
wmbiff wmbiff: Manually copy mailbox path. 2017-06-24 17:07:02 +01:00
wmbutton Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmcalc Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmCalClock Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmcalclockkbd Remove trailing whitespace. 2017-02-21 11:15:02 +00:00
wmcalendar wmcalendar: Fix capitalization in type name. 2017-02-22 10:48:05 +00:00
wmcapshare wmcapshare: Update libdockapp header path. 2017-02-22 12:35:00 +00:00
wmcdplay Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmckgmail wmckgmail uses libdockapp 2015-08-16 09:41:07 +01:00
wmcliphist wmcliphist: Release version 2.1. 2014-11-23 10:26:23 +00:00
wmclock wmclock: Bump to version 1.0.16. 2015-09-24 10:16:48 +01:00
wmcp wmcp: Include stdlib.h. 2017-02-21 11:15:02 +00:00
wmcpufreq Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmcpuload wmcpuload: Bump to version 1.1.1. 2016-10-20 15:34:31 +01:00
wmdonkeymon wmdonkeymon: Remove unused wmgeneral files list.* and misc.*. 2017-02-22 12:35:00 +00:00
wmdots wmdots: Fix typo in Makefile - use correct name for binary. 2017-02-25 10:11:28 +00:00
wmfemon wmfemon: Fix linking order to avoid undefined reference errors. 2017-02-24 10:08:05 +00:00
wmfortune wmfortune: Use short unsigned int for dockapp dimensions. 2017-02-25 10:11:28 +00:00
wmfsm wmfsm: Bump to version 0.36. 2015-08-21 08:24:26 +01:00
wmfu wmfu: Indicate directory of wireless header file. 2017-02-24 10:08:06 +00:00
wmget Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmglobe Remove trailing whitespace. 2017-02-21 11:15:02 +00:00
wmgrabimage Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmgtemp Remove trailing whitespace. 2017-02-21 11:15:02 +00:00
wmhdplop wmhdplop: include sys/sysmacros.h for major/minor funcs 2017-02-16 15:48:23 +00:00
wmhexaclock wmhexaclock: Remove precompiled binary from git. 2017-02-24 10:08:06 +00:00
wmifinfo wmifinfo: Bump to version 0.10. 2014-12-09 11:17:56 +00:00
wmifs wmifs: Bump to version 1.8. 2016-04-20 01:01:26 -04:00
wmitime wmitime: Bump to version 0.5. 2015-08-21 08:23:15 +01:00
wmix Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmjmail Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmkeys wmkeys uses libdockapp 2015-08-16 09:41:07 +01:00
wmload wmload: Bump to version 0.9.7. 2015-08-24 07:17:16 +01:00
wmlongrun wmlongrun: Update for modern kernels, *really* release version 0.3.1. 2016-12-24 12:35:45 +00:00
wmMatrix Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmmemload Remove .xvpics directories (gimp thumbnails). 2016-12-27 20:51:47 +00:00
wmmenu wmmenu: Update header file location. 2015-10-21 09:07:01 -04:00
wmmixer Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmmixer-alsa wmmixer-alsa: Add to repository. 2014-08-06 13:23:10 -06:00
wmmon wmmon uses libdockapp 2015-08-15 09:52:19 +01:00
wmmoonclock wmmoonclock: Remove Debian directory. 2017-02-24 10:08:06 +00:00
wmmp3 wmmp3: Remove AC_PATH_XTRA macro from configure.ac; caused build failure. 2017-02-21 11:15:02 +00:00
wmnet wmnet: increase polling delay to 0.1 sec and maxrate to 120kb 2015-01-11 21:31:40 +00:00
wmomikuzi wmomikuzi: main() returns an int. 2017-02-24 10:08:06 +00:00
wmpager Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmpop3 wmpop3: Use wmgeneral from libdockapp. 2017-02-24 10:08:06 +00:00
wmpop3lb wmpop3lb: Use wmgeneral from libdockapp. 2017-02-24 10:08:06 +00:00
wmpower Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmppp.app wmppp.app: Bump to version 1.3.2. 2015-08-25 15:38:30 +01:00
wmradio wmradio: Remove autotools cruft and compiled binary 2016-12-26 22:00:25 +00:00
wmshutdown wmshutdown: Bump to version 1.4. 2015-06-13 06:02:21 -06:00
wmsm.app wmsm uses libdockapp 2015-08-16 09:41:07 +01:00
wmsmixer Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmSMPmon wmSMPmon uses libdockapp 2015-08-16 09:41:07 +01:00
wmspaceweather wmspaceweather: Remove precompiled binary and object file from git. 2017-02-21 11:15:02 +00:00
wmsun wmsun: Bump to version 1.05. 2015-08-25 15:39:34 +01:00
wmsupermon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmswallow wmswallow: Link against libX11. 2017-02-26 01:37:41 +00:00
wmtetris Remove trailing whitespace. 2017-02-21 11:15:02 +00:00
wmthemech wmthemech: Remove autotools-generated files from git. 2017-02-21 11:15:02 +00:00
wmtictactoe wmtictactoe: Avoid buffer overflow by allowing room for null terminator. 2017-03-06 02:08:53 +00:00
wmtime wmtime: Bump to version 1.4. 2015-08-24 07:19:12 +01:00
wmtop Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmtrash remove trailing whitespace 2016-12-27 20:53:45 +00:00
wmtunlo Remove trailing whitespace. 2017-02-21 11:15:02 +00:00
wmtv wmtv: Remove define of VERSION in favor of version defined by autoconf. 2016-02-01 15:26:00 +05:30
wmtz wmtz uses libdockapp 2015-08-16 09:41:07 +01:00
wmwebcam Remove trailing whitespace. 2017-02-21 11:15:02 +00:00
wmwifi Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmwlmon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmwork Remove trailing whitespace in recently added dockapps. 2016-12-24 12:32:17 +00:00
wmxss wmxss: Delete NFS "silly rename" file. 2017-03-01 00:35:48 +00:00
wmymail wmymail: Update libdockapp path. 2017-02-26 01:37:41 +00:00