eina_vpath: add null checking logic on vpath_resolve api

Summary:
there is a patch that add vpath_resolve() call before eina_file_open()
because `path` arg could be NULL, the patch kills some applications.
this patch add null checking logic on vpath_resolve api

Reviewers: bu5hm4n, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9748
This commit is contained in:
Wonki Kim 2019-08-27 20:25:02 +09:00 committed by Hermet Park
parent 4c489d5a2e
commit 979757c845
1 changed files with 1 additions and 0 deletions

View File

@ -327,6 +327,7 @@ EAPI char *
eina_vpath_resolve(const char* path)
{
char buf[PATH_MAX];
EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
if (_eina_vpath_resolve(path, buf, sizeof(buf)) > 0)
return strdup(buf);