wmfsm: Handle errors related to the HOME environment variable.
commit2be3432290c782092c080a137032c2bd5b555740
authorDoug Torrance <dtorrance@piedmont.edu>
Fri, 21 Aug 2015 06:20:20 +0000 (21 02:20 -0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 21 Aug 2015 07:24:26 +0000 (21 08:24 +0100)
treea7a1c94dd87e9338519b9523179be8c7ac221e7d
parent6fb80be9e0dc14a4ec73737dd5920fd5084dcc87
wmfsm: Handle errors related to the HOME environment variable.

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/
wmfsm/wmfsm/wmfsm.c