bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3cdb7df50b7a06929236df30bff7f8f8b1453ea4

commit 3cdb7df50b7a06929236df30bff7f8f8b1453ea4
Author: Christopher Michael <cp.mich...@samsung.com>
Date:   Tue Mar 12 10:07:26 2019 -0400

    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 <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D8311
---
 src/lib/ecore/efl_core_command_line.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/efl_core_command_line.c 
b/src/lib/ecore/efl_core_command_line.c
index c51e64a98d..1c084030f1 100644
--- a/src/lib/ecore/efl_core_command_line.c
+++ b/src/lib/ecore/efl_core_command_line.c
@@ -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);
 
    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);
    if (!pd->command)
      {

-- 


Reply via email to