raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b034b4884f4690e16fbdd33f5a443d5a2d614bf4

commit b034b4884f4690e16fbdd33f5a443d5a2d614bf4
Author: Shinwoo Kim <cinoo....@samsung.com>
Date:   Tue Dec 22 08:02:19 2015 +0900

    [config] fix static analysis issue
    
    Summary: Fix static analysis issue
    
    Fix possible pointer mis-use in elm profile string handling
    
    @fix
    
    Test Plan: Static analysis
    
    Reviewers: cedric, jpeg, raster
    
    Reviewed By: raster
    
    Subscribers: seoz
    
    Differential Revision: https://phab.enlightenment.org/D3474
---
 src/lib/elm_config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 50d9b6e..7cbc2c7 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -1132,11 +1132,11 @@ _profile_fetch_from_conf(void)
                        memcpy(_elm_profile, p, len);
                        _elm_profile[len] = 0;
                        free(p);
+                       p = strchr(_elm_profile, '/');
+                       if (p) *p = 0;
                     }
                   else free(p);
                   eet_close(ef);
-                  p = strchr(_elm_profile, '/');
-                  if (p) *p = 0;
                   return;
                }
              eet_close(ef);

-- 


Reply via email to