eina: fix valgrind invalid read of size in eina_file_path_sanitize.
Summary:
Apparently eina_tmpstr_strlen counts the null character as well. This
doesn't follow how strlen works, as the latter excludes it from the count.
This resulted in mistreatment of the string in _eina_file_escape, with
tmp_str paths that had "../".
This fix will do for now, but it is advised that we avoid using
eina_tmpstr_strlen, to prevent such confusions in the future.
Test Plan:
The following lines will throw a valgrind 'invalid read of size 1' error
prior this fix:
char *path = "home/mydir/../myfile";
Eina_Tmpstr *tmp_str = eina_tmpstr_add(path);
char *ret_path = eina_file_path_sanitize(path);
@fix
Reviewers: cedric, stefan_schmidt
Subscribers: tasn, cedric
Differential Revision: https://phab.enlightenment.org/D1929
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>