raster pushed a commit to branch master.

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

commit e82b61b4208c717911d4db1f065efeb42190feef
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Aug 14 17:39:11 2014 +0900

    epp - fix bit underflow in bitshift for multibyte
    
    this fixes CID 1193200
---
 src/bin/edje/epp/cppexp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/epp/cppexp.c b/src/bin/edje/epp/cppexp.c
index d61e054..79d6f3f 100644
--- a/src/bin/edje/epp/cppexp.c
+++ b/src/bin/edje/epp/cppexp.c
@@ -412,9 +412,10 @@ cpp_lex(struct operation *op, cpp_reader * pfile)
             {
                int                 num_bits = num_chars * width;
 
-               if (cpp_lookup("__CHAR_UNSIGNED__",
+               if ((num_bits > 0) &&
+                   (cpp_lookup("__CHAR_UNSIGNED__",
                               sizeof("__CHAR_UNSIGNED__") - 1, -1)
-                   || ((result >> (num_bits - 1)) & 1) == 0)
+                   || ((result >> (num_bits - 1)) & 1) == 0))
                   op->value =
                      result & ((unsigned long)~0 >>
                                (HOST_BITS_PER_LONG - num_bits));

-- 


Reply via email to