wmaker: make parsing on display name less prone to crash in SetupEnvironment (Coverit...
commitde5ef8c4f18dc98a0e2bd646e3dcc1192575cace
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 15 Nov 2014 18:40:48 +0000 (15 19:40 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 23 Nov 2014 22:43:37 +0000 (23 22:43 +0000)
tree857adfafe3f47ff01f78581fcbf868fc019a1b21
parent38463df1024bd96448da0fd86257788d0ac4dc9d
wmaker: make parsing on display name less prone to crash in SetupEnvironment (Coverity #50096)

When creating the environment variable for the sub-process that wmaker can
create, Coverity pointed that if was possible to crash if the name of the
display did not contain the ':', which is probably ok in most case, but we
can't be sure about what it could contain in special cases.

This patch adds a proper check so, at least, it would not crash if the case
were to arise.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
src/main.c