eo_debug: Fix segfault when parsing EO_LIFECYCLE_DEBUG envvar
authorXavi Artigas <xavierartigas@yahoo.es>
Thu, 21 Jun 2018 11:10:56 +0000 (13:10 +0200)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 21 Jun 2018 21:44:16 +0000 (06:44 +0900)
commit1679f638171b0f81faefeb13d7df283d0072f50b
tree7c5f1c191f25fe18f7e06a2991c95a223f68b2dc
parent3830d932ec917cf6c2763015d86e01c5278eccca
eo_debug: Fix segfault when parsing EO_LIFECYCLE_DEBUG envvar

Summary:
The 'if' block should only be executed when the string contains the colon and
something else behind, but sscanf cannot be used in this case.
If the string contained no colon, the following line with strchr(s, ':')
returns NULL and everything explodes.

Test Plan: eo_debug -l now works for me without segfaulting.

Reviewers: bu5hm4n, zmike, devilhorns, q66

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6347
src/lib/eo/eo.c