jpeg pushed a commit to branch master.

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

commit d6817f4d6e48ab4a11bfb26bc953ab0d3528c9f4
Author: Jean-Philippe Andre <[email protected]>
Date:   Tue Aug 9 11:19:11 2016 +0900

    evas filters: Fix minor issue with print
    
    If the call to tostring() fails, replace the string by (invalid)
    rather than ignore the error.
    
    Fixes CID 1308612
---
 src/lib/evas/filters/evas_filter_parser.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 7b33b04..d45b883 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2202,8 +2202,13 @@ _lua_print(lua_State *L)
         lua_getglobal(L, _lua_errfunc_name);
         lua_getglobal(L, "tostring"); //+1
         lua_pushvalue(L, i); //+1
-        lua_pcall(L, 1, 1, -3); //-2/+1
-        str = lua_tostring(L, -1);
+        if (lua_pcall(L, 1, 1, -3) == 0) //-2/+1
+          str = lua_tostring(L, -1);
+        else
+          {
+             ERR("tostring() failed inside print(): %s", lua_tostring(L, -1));
+             str = "(invalid)";
+          }
         eina_strbuf_append(s, str ? str : "(nil)");
         lua_pop(L, 2);
         eina_strbuf_append_char(s, ' ');

-- 


Reply via email to