In particular, if HOME is undefined, then a segmentation fault will occur.
Also, if HOME is at least 245 characters, then a buffer overflow will occur.
We check for these conditions and exit with an error message instead.
Patch obtained from Debian package [1].
[1] https://sources.debian.net/src/wmfsm/0.35-1/debian/patches/handle_HOME_errors.patch/
In particular, we can specify the offsets from the right and bottom of the
screen using '-', e.g., '-geometry -64-64' places the dockapp in the lower
right corner of the screen.
This fixes "(portability) scanf without field width limits can crash with
huge input data on some versions of libc" warning from cppcheck.
We choose 10 as the field width limit as it is the number of characters in
2^31-1, the largest int.
Note that this was a fork of the earlier 1998-05-02 version and didn't
contain the later changes. Therefore we merge the best of both versions.
wmtime had some additional unnecessary dummy variables, so we use the wmmon
version.
Note that wmckgmail and wmtz were identical; this is the version we use.
wmSMPmon differed only with some whitespace.
wmitime differed only with a bugfix (a segfault when -display is given with
no argument), but this will be fixed again in the next commit.
wmsm.app had patched wmgeneral to work with its xpm; instead we patch its
xpm to work with wmgeneral.
In particular,
- Add new --version command line option. (This was already documented in
the manpage.) Remove this information from the --help text. Also took
the opportunity to properly align the --fire line in the --help text.
- Remove WMFSM_VERSION macro in favor of PACKAGE_VERSION from autconf.
- Remove hard-coded version number at top of source file for
maintainability.
In particular,
- Apply, with some modification, a patch by Jari Aalto
<jari.aalto@poboxes.com> to clarify the format of the configuration file.
See [1].
- Escape minus signs to avoid hyphen-used-as-minus-sign Lintian warning in
the Debian package.
- Remove docbook-to-man comments to avoid manpage-has-errors-from-man
Lintian warning in the Debian package.
- Add commas between short and long options for readability.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?archive=yes&bug=226274
The individual patches no longer seem to exist, so I submit them together.
According to debian/changelog entries by Arthur Korn <arthur@debian.org>,
these patches include:
* fixed memleak introduced in 0.34-2 with the patch by Timo Benk.
global char *mp[] was assigned the result of stdup() repeatedly
without free. My ugly fix is to free it all up at the beginning of
readFileSystems(). Now I'm a proud Perl coder ... closes: #196057
* memleak news: avoid it if there are more than 9 filesystems too.
* Fixed filesystem name corruption, thanks to Ralf Horstmann and Cristian
Ionescu-Idbohrn for the patch.
In particular,
- Update AM_INIT_AUTOMAKE to silence "two- and three-arguments forms are
deprecated" warnings.
- Update AC_DEFINEs to silence "missing template" warnings.