forked from enlightenment/efl
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
This commit is contained in:
parent
933c0a6b04
commit
0bcd4f73d2
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue