raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0bcd4f73d29f9823c7b71541dd0a37ffa81af7a0

commit 0bcd4f73d29f9823c7b71541dd0a37ffa81af7a0
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Aug 8 18:32:16 2016 +0900

    elm filesel - handle api that might provide path too big for buffer
    
    this addresses a path that could be too small (unlikely due to max
    path generally being 4k), for a stack buffer. this should make
    coverity happy. fix CID 1356634
---
 src/lib/elementary/elc_fileselector.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elc_fileselector.c 
b/src/lib/elementary/elc_fileselector.c
index f0469f1..cb8e2eb 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -467,7 +467,8 @@ _filter_child(Elm_Fileselector_Data* sd,
    //Search entry filter
    if ((sd->search_string) && (sd->search_string[0] != '\0'))
      {
-        strcpy(temp_path, path);
+        strncpy(temp_path, path, sizeof(temp_path) - 1);
+        temp_path[sizeof(temp_path) - 1] = 0;
         pch = strchr(temp_path, '/');
         while (pch != NULL)
           {

-- 


Reply via email to