jpeg pushed a commit to branch master.

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

commit bd32015dfc13e2a31a250e7046036f81030cfb96
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Dec 29 15:56:24 2015 +0900

    Eet: Fail gracefully on invalid input
    
    Consider infinity and NaN as invalid input for
    put_float and put_double, since the underlying convert
    function can't process them.
    
    This fixes potential errors with incomplete / invalid evas 3d models
---
 src/lib/eet/eet_data.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index ad2fe47..eb5a44a 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -1018,7 +1018,8 @@ eet_data_put_float(Eet_Dictionary *ed,
    char buf[128];
    int idx;
 
-   eina_convert_dtoa((double)(*(float *)src), buf);
+   if (!eina_convert_dtoa((double)(*(float *)src), buf))
+     return NULL;
 
    if (!ed)
      {
@@ -1094,7 +1095,8 @@ eet_data_put_double(Eet_Dictionary *ed,
    char buf[128];
    int idx;
 
-   eina_convert_dtoa((double)(*(double *)src), buf);
+   if (!eina_convert_dtoa((double)(*(double *)src), buf))
+     return NULL;
 
    if (!ed)
      {

-- 


Reply via email to