summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-28 20:08:21 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-29 09:08:31 +0900
commitfec726e7e54890fbff35f9f47d21a32a51d406f5 (patch)
treefe0ea21b8a131be76eb7448fd6a514b692b390b9
parent091146fa34c4e7616375a67773c8e143af1d1674 (diff)
evas legacy event mask - cast to unit64_t before bitshift
this fixes a bit wraparound in the shift as the 1 is an int (32bit) type that then gets shifted .. then after that cast to 64bit. found by PVS studio @fix
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c2
-rw-r--r--src/lib/evas/include/evas_inline.x2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index a6f3ee419e..184b500743 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -708,7 +708,7 @@ _check_event_catcher_add(void *data, const Efl_Event *event)
708 } 708 }
709 else if ((type = _legacy_evas_callback_type(array[i].desc)) != EVAS_CALLBACK_LAST) 709 else if ((type = _legacy_evas_callback_type(array[i].desc)) != EVAS_CALLBACK_LAST)
710 { 710 {
711 obj->callback_mask |= (1 << type); 711 obj->callback_mask |= (((uint64_t)1) << type);
712 } 712 }
713 } 713 }
714} 714}
diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x
index 3093a949b3..f17e8b3949 100644
--- a/src/lib/evas/include/evas_inline.x
+++ b/src/lib/evas/include/evas_inline.x
@@ -47,7 +47,7 @@ _evas_object_event_new(void)
47static inline Eina_Bool 47static inline Eina_Bool
48_evas_object_callback_has_by_type(Evas_Object_Protected_Data *obj, Evas_Callback_Type type) 48_evas_object_callback_has_by_type(Evas_Object_Protected_Data *obj, Evas_Callback_Type type)
49{ 49{
50 return (obj->callback_mask & (1 << type)) != 0; 50 return (obj->callback_mask & (((uint64_t)1) << type)) != 0;
51} 51}
52 52
53static inline int 53static inline int