summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-14 17:39:11 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-14 17:39:11 +0900
commite82b61b4208c717911d4db1f065efeb42190feef (patch)
tree4c1c407434db60d3e0ee489b7faec24e2a4c26b9 /src/bin/edje
parent49694c9a64d99c8974d23e903b5913b3fdfc29fa (diff)
epp - fix bit underflow in bitshift for multibyte
this fixes CID 1193200
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/epp/cppexp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/edje/epp/cppexp.c b/src/bin/edje/epp/cppexp.c
index d61e05459c..79d6f3f49d 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)
412 { 412 {
413 int num_bits = num_chars * width; 413 int num_bits = num_chars * width;
414 414
415 if (cpp_lookup("__CHAR_UNSIGNED__", 415 if ((num_bits > 0) &&
416 (cpp_lookup("__CHAR_UNSIGNED__",
416 sizeof("__CHAR_UNSIGNED__") - 1, -1) 417 sizeof("__CHAR_UNSIGNED__") - 1, -1)
417 || ((result >> (num_bits - 1)) & 1) == 0) 418 || ((result >> (num_bits - 1)) & 1) == 0))
418 op->value = 419 op->value =
419 result & ((unsigned long)~0 >> 420 result & ((unsigned long)~0 >>
420 (HOST_BITS_PER_LONG - num_bits)); 421 (HOST_BITS_PER_LONG - num_bits));