forked from enlightenment/efl
efl_core_command_line: Fix dereference before NULL check
This patch fixes an issue detected by Coverity where pd->string_command is dereferenced before a NULL check. Fixes Coverity CID1399098 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8311
This commit is contained in:
parent
2cef513694
commit
3cdb7df50b
|
@ -257,7 +257,9 @@ _efl_core_command_line_command_string_set(Eo *obj EINA_UNUSED, Efl_Core_Command_
|
||||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE);
|
EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE);
|
||||||
|
|
||||||
pd->string_command = eina_strdup(str);
|
pd->string_command = eina_strdup(str);
|
||||||
_remove_invalid_chars(pd->string_command);
|
|
||||||
|
if (pd->string_command)
|
||||||
|
_remove_invalid_chars(pd->string_command);
|
||||||
pd->command = _unescape(str);
|
pd->command = _unescape(str);
|
||||||
if (!pd->command)
|
if (!pd->command)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue