[EGIT] [core/efl] master 01/01: Eina_Xattr: fix memory corruption

2017-03-23 Thread Artem Popov
nikawhite pushed a commit to branch master.

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

commit 8d6c90351c9d4fd8557c250dce18c7e7119fbd64
Author: Artem Popov <artem.po...@samsung.com>
Date:   Thu Mar 23 16:27:22 2017 +0200

Eina_Xattr: fix memory corruption

Summary:
There should be reallocation +1 (for last '\0') and also
checking >0, not !=0, because of getxattr can return -1 in case of error
@fix

Reviewers: cedric, raster, NikaWhite, jpeg

Reviewed By: NikaWhite

Subscribers: myoungwoon

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D4734
---
 src/lib/eina/eina_xattr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/eina/eina_xattr.c b/src/lib/eina/eina_xattr.c
index d5e6970..a32ff53 100644
--- a/src/lib/eina/eina_xattr.c
+++ b/src/lib/eina/eina_xattr.c
@@ -80,7 +80,7 @@ _eina_xattr_value_ls_fd_iterator_next(Eina_Xattr_Iterator 
*it, void **data)
it->offset += strlen(it->attr->name) + 1;
 
it->attr->length = fgetxattr(it->fd, it->attr->name, NULL, 0);
-   if (it->attr->length)
+   if (it->attr->length > 0)
  {
 tmp = realloc((void*) it->attr->value, it->attr->length + 1);
 if (!tmp)
@@ -115,9 +115,9 @@ _eina_xattr_value_ls_iterator_next(Eina_Xattr_Iterator *it, 
void **data)
it->offset += strlen(it->attr->name) + 1;
 
it->attr->length = getxattr(it->file, it->attr->name, NULL, 0);
-   if (it->attr->length)
+   if (it->attr->length > 0)
  {
-tmp = realloc((void*) it->attr->value, it->attr->length);
+tmp = realloc((void*) it->attr->value, it->attr->length + 1);
 if (!tmp)
   {
  free((void*) it->attr->value);

-- 




[EGIT] [core/efl] master 01/01: Evas: include efl_vg_container.eo.legacy.h to avoid implicit declaration for evas_vg_container_child* @fix

2016-12-06 Thread Artem Popov
hermet pushed a commit to branch master.

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

commit 4707c86a830e929c10827584bc529aa549cd75a8
Author: Artem Popov <artem.po...@samsung.com>
Date:   Wed Dec 7 14:21:12 2016 +0900

Evas: include efl_vg_container.eo.legacy.h to avoid implicit declaration 
for evas_vg_container_child* @fix

Summary: Due to implicit declaration, evas_vg_container_child_get casts to 
int and on 64-bit can return wrong pointer

Reviewers: cedric, NikaWhite, myoungwoon, jpeg, an.kroitor, Hermet

Reviewed By: Hermet

Subscribers: t.naumenko

Differential Revision: https://phab.enlightenment.org/D4464
---
 src/lib/evas/Evas_Legacy.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 78653e7..cfdf7e7 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -2633,7 +2633,7 @@ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) 
EINA_WARN_UNUSED_RESULT EIN
 EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT 
EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 #include "canvas/evas_vg.eo.legacy.h"
-
+#include "canvas/efl_vg_container.eo.legacy.h"
 /**
  * Creates a new vector shape object \.
  *

-- 




[EGIT] [core/efl] master 06/07: Eet: add EINA_ARG_NONNULL for eet_data_text_undump* @fix

2016-11-30 Thread Artem Popov
jpeg pushed a commit to branch master.

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

commit e0827a6a90acde0418f7375b5026fea5f3bb0408
Author: Artem Popov <artem.po...@samsung.com>
Date:   Thu Dec 1 11:05:50 2016 +0900

Eet: add EINA_ARG_NONNULL for eet_data_text_undump* @fix

Summary: Eet_data_text_undump/undump_cipher: add EINA_ARG_NONNULL for 
mandatory pointer on size(int)

Reviewers: cedric, NikaWhite, myoungwoon, jpeg

Reviewed By: jpeg

Subscribers: jpeg, t.naumenko

Differential Revision: https://phab.enlightenment.org/D4440
---
 src/lib/eet/Eet.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h
index 39f060a..19ab574 100644
--- a/src/lib/eet/Eet.h
+++ b/src/lib/eet/Eet.h
@@ -3268,7 +3268,7 @@ eet_data_text_dump(const void *data_in,
 EAPI void *
 eet_data_text_undump(const char *text,
  int textlen,
- int *size_ret);
+ int *size_ret) EINA_ARG_NONNULL(3);
 
 /**
  * Dump an eet encoded data structure from an eet file into ascii text
@@ -4101,7 +4101,7 @@ EAPI void *
 eet_data_text_undump_cipher(const char *text,
 const char *cipher_key,
 int textlen,
-int *size_ret);
+int *size_ret) EINA_ARG_NONNULL(4);
 
 /**
  * Dump an eet encoded data structure from an eet file into ascii

-- 




[EGIT] [core/efl] master 01/07: eet: add checking on null to eet_data_write_cipher and EINA_ARG_NONNULL to dump API @fix

2016-11-28 Thread Artem Popov
cedric pushed a commit to branch master.

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

commit 30693b84875c6f1e0b9a30678ba3e64244cd6daf
Author: Artem Popov <artem.po...@samsung.com>
Date:   Mon Nov 28 10:44:59 2016 -0800

eet: add checking on null to eet_data_write_cipher and EINA_ARG_NONNULL to 
dump API @fix

Summary:
add checking on null to eet_data_write_cipher and EINA_ARG_NONNULL to 
eet_data_dump*
and eet_data_test_dump* API

Reviewers: NikaWhite, myoungwoon, cedric

Reviewed By: cedric

Subscribers: jpeg, t.naumenko

Differential Revision: https://phab.enlightenment.org/D4433

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/eet/Eet.h  | 8 
 src/lib/eet/eet_data.c | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h
index c69c115..39f060a 100644
--- a/src/lib/eet/Eet.h
+++ b/src/lib/eet/Eet.h
@@ -3244,7 +3244,7 @@ EAPI int
 eet_data_text_dump(const void *data_in,
int size_in,
Eet_Dump_Callback dumpfunc,
-   void *dumpdata);
+   void *dumpdata) EINA_ARG_NONNULL(3);
 
 /**
  * Take an ascii encoding from eet_data_text_dump() and re-encode in binary.
@@ -3297,7 +3297,7 @@ EAPI int
 eet_data_dump(Eet_File *ef,
   const char *name,
   Eet_Dump_Callback dumpfunc,
-  void *dumpdata);
+  void *dumpdata) EINA_ARG_NONNULL(3);
 
 /**
  * Take an ascii encoding from eet_data_dump() and re-encode in binary.
@@ -4074,7 +4074,7 @@ eet_data_text_dump_cipher(const void *data_in,
   const char *cipher_key,
   int size_in,
   Eet_Dump_Callback dumpfunc,
-  void *dumpdata);
+  void *dumpdata) EINA_ARG_NONNULL(4);
 
 /**
  * Take an ascii encoding from eet_data_text_dump() and re-encode
@@ -4133,7 +4133,7 @@ eet_data_dump_cipher(Eet_File *ef,
  const char *name,
  const char *cipher_key,
  Eet_Dump_Callback dumpfunc,
- void *dumpdata);
+ void *dumpdata) EINA_ARG_NONNULL(4);
 
 /**
  * Take an ascii encoding from eet_data_dump() and re-encode in
diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index d4ba25f..865eee9 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -2397,6 +2397,7 @@ eet_data_write_cipher(Eet_File*ef,
int val;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(edd, 0);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0);
 
ed = eet_dictionary_get(ef);
 

-- 




[EGIT] [core/efl] master 03/07: eina/log: add ARG_NONNULL to eina_log* APIs for Eina_Log_Domain * parameter @fix

2016-11-28 Thread Artem Popov
cedric pushed a commit to branch master.

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

commit 05246782dc9c94eeb24bb29e1489ced512259cca
Author: Artem Popov <artem.po...@samsung.com>
Date:   Mon Nov 28 10:56:47 2016 -0800

eina/log: add ARG_NONNULL to eina_log* APIs for Eina_Log_Domain * parameter
@fix

Summary: add ARG_NONNULL to eina_log* APIs for Eina_Log_Domain * parameter 
that is always in use, can not be NULL.

Reviewers: cedric, Hermet, myoungwoon, NikaWhite

Reviewed By: NikaWhite

Subscribers: t.naumenko, jpeg

Differential Revision: https://phab.enlightenment.org/D4426

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/eina/eina_log.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eina/eina_log.h b/src/lib/eina/eina_log.h
index 84e7f23..a6da1b8 100644
--- a/src/lib/eina/eina_log.h
+++ b/src/lib/eina/eina_log.h
@@ -861,7 +861,7 @@ EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d,
intline,
const char*fmt,
void  *data,
-   va_listargs);
+   va_listargs) 
EINA_ARG_NONNULL(1);
 
 /**
  * @brief Default logging method, this will output to standard error stream.
@@ -904,7 +904,7 @@ EAPI void eina_log_print_cb_stderr(const Eina_Log_Domain *d,
intline,
const char*fmt,
void  *data,
-   va_listargs);
+   va_listargs) 
EINA_ARG_NONNULL(1);
 
 /**
  * Alternative logging method, this will output to given file stream.
@@ -931,7 +931,7 @@ EAPI void eina_log_print_cb_file(const Eina_Log_Domain *d,
  intline,
  const char*fmt,
  void  *data,
- va_listargs);
+ va_listargs) 
EINA_ARG_NONNULL(1);
 
 
 /**
@@ -960,7 +960,7 @@ EAPI void eina_log_print_cb_journald(const Eina_Log_Domain 
*d,
 int line,
 const char *fmt,
 void *data,
-va_list args);
+va_list args) EINA_ARG_NONNULL(1);
 
 /**
  * Configure console color of given file.

-- 




[EGIT] [core/efl] master 02/02: Edje: add checking on NULL 3-rd parameter in edje_object_part_external_param_type_get() @fix

2016-11-23 Thread Artem Popov
hermet pushed a commit to branch master.

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

commit 7372b1d156ec989655204a2b409281a6996fd88c
Author: Artem Popov <artem.po...@samsung.com>
Date:   Thu Nov 24 12:13:36 2016 +0900

Edje: add checking on NULL 3-rd parameter in 
edje_object_part_external_param_type_get()
@fix

Summary: add checking on NULL 3-rd parameter (param) before strcmp to avoid 
segfault

Reviewers: cedric, jpeg, NikaWhite, myoungwoon, Hermet

Reviewed By: Hermet

Subscribers: Hermet, t.naumenko

Differential Revision: https://phab.enlightenment.org/D4424
---
 src/lib/edje/edje_external.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_external.c b/src/lib/edje/edje_external.c
index 9065f94..8e242f1 100644
--- a/src/lib/edje/edje_external.c
+++ b/src/lib/edje/edje_external.c
@@ -124,7 +124,7 @@ _edje_object_part_external_param_type_get(Eo *obj, Edje 
*ed, const char *part, c
Edje_External_Type *type;
Edje_External_Param_Info *info;
 
-   if ((!ed) || (!part)) return EDJE_EXTERNAL_PARAM_TYPE_MAX;
+   if ((!ed) || (!part) || (!param)) return EDJE_EXTERNAL_PARAM_TYPE_MAX;
 
rp = _edje_real_part_recursive_get(, (char *)part);
if (!rp)
@@ -147,7 +147,7 @@ _edje_object_part_external_param_type_get(Eo *obj, Edje 
*ed, const char *part, c
 return EDJE_EXTERNAL_PARAM_TYPE_MAX;
  }
for (info = type->parameters_info; info->name; info++)
- if (strcmp(info->name, param) == 0) return info->type; ;
+ if (strcmp(info->name, param) == 0) return info->type;
 
ERR("no parameter '%s' external type '%s'", param, type->module_name);
 

-- 




[EGIT] [core/efl] master 01/02: eet: add NULL-check to eet_connection_empty API to avoid segfault

2016-11-16 Thread Artem Popov
cedric pushed a commit to branch master.

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

commit 0b6e04d94fc3ff6447b6fbf0fcdbdd8b6958e621
Author: Artem Popov <artem.po...@samsung.com>
Date:   Wed Nov 16 15:30:29 2016 -0800

eet: add NULL-check to eet_connection_empty API to avoid segfault

@fix

Summary:
Only eet_connection_empty hasn't checking on NULL and try to read from 
field of object.
Add NULL-check for connection and return result of empty connection.

Reviewers: jpeg, cedric, myoungwoon

Subscribers: t.naumenko, NikaWhite

Differential Revision: https://phab.enlightenment.org/D4399

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/eet/eet_connection.c | 1 +
 src/lib/eet/eet_data.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/lib/eet/eet_connection.c b/src/lib/eet/eet_connection.c
index 7945692..735e112 100644
--- a/src/lib/eet/eet_connection.c
+++ b/src/lib/eet/eet_connection.c
@@ -157,6 +157,7 @@ _eet_connection_raw_send(Eet_Connection *conn,
 EAPI Eina_Bool
 eet_connection_empty(Eet_Connection *conn)
 {
+   EINA_SAFETY_ON_NULL_RETURN_VAL(conn, EINA_TRUE);
return conn->size ? EINA_FALSE : EINA_TRUE;
 }
 
diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index cabafc3..d4ba25f 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -5281,6 +5281,7 @@ eet_data_descriptor_encode_cipher(Eet_Data_Descriptor 
*edd,
int size;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(edd, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(data_in, NULL);
 
ret = _eet_data_descriptor_encode(NULL, edd, data_in, );
if (cipher_key && ret)

-- 




[EGIT] [core/efl] master 01/01: eet: add to basic eet_image EAPIs checking on NULL @fix

2016-11-11 Thread Artem Popov
cedric pushed a commit to branch master.

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

commit e6b074ad214abb6bb563c1762934631ad0ecc2d4
Author: Artem Popov <artem.po...@samsung.com>
Date:   Fri Nov 11 09:57:38 2016 -0800

eet: add to basic eet_image EAPIs checking on NULL
@fix

Summary: to avoid segfaults with NULL raw data, add checking on NULL to 
basic eet_image APIS

Reviewers: NikaWhite, cedric, myoungwoon, jpeg

Reviewed By: jpeg

Subscribers: t.naumenko, jpeg

Differential Revision: https://phab.enlightenment.org/D4386

Signed-off-by: Cedric Bail <ced...@osg.samsung.com>
---
 src/lib/eet/eet_image.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c
index 1da7985..b77d90e 100644
--- a/src/lib/eet/eet_image.c
+++ b/src/lib/eet/eet_image.c
@@ -1577,6 +1577,9 @@ eet_data_image_encode_cipher(const void  *data,
unsigned int ciphered_sz = 0;
int size = 0;
 
+   if (!data)
+ return NULL;
+
switch (lossy)
  {
   case EET_IMAGE_LOSSLESS:
@@ -1688,6 +1691,9 @@ eet_data_image_header_advance_decode_cipher(const void   
*data,
unsigned int deciphered_sz = 0;
int r = 0;
 
+   if (!data)
+ return NULL;
+
if (cipher_key)
  {
 if (!eet_decipher(data, size, cipher_key, strlen(cipher_key),
@@ -2083,6 +2089,9 @@ eet_data_image_decode_cipher(const void   *data,
void *deciphered_d = NULL;
unsigned int deciphered_sz = 0;
 
+   if (!data)
+ return NULL;
+
if (cipher_key)
  {
 if (!eet_decipher(data, size, cipher_key, strlen(cipher_key),
@@ -2171,6 +2180,9 @@ eet_data_image_decode_to_cspace_surface_cipher(const void 
  *data,
void *deciphered_d = NULL;
unsigned int deciphered_sz = 0;
 
+   if (!data)
+ return NULL;
+
if (cipher_key)
  {
 if (!eet_decipher(data, size, cipher_key, strlen(cipher_key),

-- 




[EGIT] [core/efl] master 03/04: Eina: add NULL check to eina_module_symbol_global_set API @fix

2016-11-07 Thread Artem Popov
cedric pushed a commit to branch master.

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

commit a061f211c09789bf82ef5e9e8b500528a5ab29d5
Author: Artem Popov <artem.po...@samsung.com>
Date:   Mon Nov 7 14:42:51 2016 -0800

Eina: add NULL check to eina_module_symbol_global_set API @fix

Summary: Add checking on NULL like in other API in module, to avoid 
segmentation fault

Reviewers: NikaWhite, cedric

Reviewed By: cedric

Subscribers: myoungwoon, jpeg

Differential Revision: https://phab.enlightenment.org/D4383

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/eina/eina_module.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eina/eina_module.c b/src/lib/eina/eina_module.c
index a91f61a..affaf2c 100644
--- a/src/lib/eina/eina_module.c
+++ b/src/lib/eina/eina_module.c
@@ -404,6 +404,7 @@ EAPI const char *eina_module_file_get(const Eina_Module *m)
 
 EAPI void eina_module_symbol_global_set(Eina_Module *module, Eina_Bool global)
 {
+   EINA_SAFETY_ON_NULL_RETURN(module);
module->global = !!global;
 }
 

-- 




[EGIT] [core/efl] master 01/01: ecore_file: Fix improper way of comparing in ecore_file_path_dir_exists @fix

2016-09-20 Thread Artem Popov
nikawhite pushed a commit to branch master.

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

commit 132ae9683c242b695d1bb3050c09f83386d0667d
Author: Artem Popov <artem.po...@samsung.com>
Date:   Tue Sep 20 19:52:23 2016 +0300

ecore_file: Fix improper way of comparing in ecore_file_path_dir_exists @fix

Summary: There is wrong comparing while using strcmp function. Should be 
inverted.

Reviewers: cedric, raster, NikaWhite

Reviewed By: NikaWhite

Subscribers: cedric, NikaWhite, jpeg

Differential Revision: https://phab.enlightenment.org/D4291
---
 src/lib/ecore_file/ecore_file_path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_file/ecore_file_path.c 
b/src/lib/ecore_file/ecore_file_path.c
index a368cf3..71fdb68 100644
--- a/src/lib/ecore_file/ecore_file_path.c
+++ b/src/lib/ecore_file/ecore_file_path.c
@@ -97,7 +97,7 @@ ecore_file_path_dir_exists(const char *in_dir)
if (!__ecore_file_path_bin) return EINA_FALSE;
EINA_LIST_FOREACH(__ecore_file_path_bin, l, dir)
  {
-if (strcmp(dir, in_dir))
+if (!strcmp(dir, in_dir))
   return EINA_TRUE;
  }
 

-- 




[EGIT] [core/efl] master 01/02: ecore_evas_ews: add proper clean up when quit the func @fix

2016-08-22 Thread Artem Popov
cedric pushed a commit to branch master.

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

commit d8cab9347af00e791e168d3e47d0988582d1d097
Author: Artem Popov <artem.po...@samsung.com>
Date:   Fri Aug 19 15:39:52 2016 -0700

ecore_evas_ews: add proper clean up when quit the func
@fix

Summary: add proper clean up when quit the func (as per Raster comment)

Reviewers: cedric, raster, jpeg, barbieri

Reviewed By: barbieri

Subscribers: raster, NikaWhite, myoungwoon, jpeg

Differential Revision: https://phab.enlightenment.org/D4175

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/ecore_evas/ecore_evas_ews.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/ecore_evas_ews.c 
b/src/lib/ecore_evas/ecore_evas_ews.c
index d409952..904c504 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -1323,7 +1323,13 @@ ecore_evas_ews_engine_set(const char *engine, const char 
*options)
_ews_options = options ? strdup(options) : NULL;
 
if ((engine) && (!_ews_engine)) return EINA_FALSE;
-   if ((options) && (!_ews_options)) return EINA_FALSE;
+   if ((options) && (!_ews_options))
+ {
+free(_ews_engine);
+_ews_engine = NULL;
+_ews_defaults_engine = EINA_TRUE;
+return EINA_FALSE;
+ }
 
_ews_defaults_engine = EINA_FALSE;
return EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/01: Elementary: cnp - check on NULL data in elm_drag_start

2016-07-03 Thread Artem Popov
jpeg pushed a commit to branch master.

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

commit 71a0573187a7128332100cc96131d35ae1846f67
Author: Artem Popov <artem.po...@samsung.com>
Date:   Mon Jul 4 10:49:55 2016 +0900

Elementary: cnp - check on NULL data in elm_drag_start

Summary:
check on NULL add in wayland elm_drag_start API
@fix

Test Plan: Call elm_grag_start with data = NULL under wayland

Reviewers: zmike, NikaWhite, jpeg

Reviewed By: NikaWhite, jpeg

Subscribers: bu5hm4n, myoungwoon, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4119
---
 src/lib/elementary/elm_cnp.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index a7f81ee..855e7d8 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -3345,8 +3345,13 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 
/* set the drag data used when a drop occurs */
free(wl_cnp_selection.selbuf);
-   wl_cnp_selection.selbuf = strdup((char*)data);
-   wl_cnp_selection.buflen = strlen(wl_cnp_selection.selbuf);
+   wl_cnp_selection.buflen = 0;
+   wl_cnp_selection.selbuf = eina_strdup(data);
+
+   if (data)
+ {
+wl_cnp_selection.buflen = strlen(wl_cnp_selection.selbuf);
+ }
 
/* setup callback to notify if this object gets deleted */
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,

-- 




Re: [E-devel] Trouble with map block

2013-07-16 Thread Artem Popov

   Raster,


   thank you for help. Installing 1.7.99 resolved this problem (was tested on
   1.7 first).


Artem Popov


   --- Original Message ---

   Sender : Carsten Haitzlerras...@rasterman.com

   Date : Jul 12, 2013 02:51 (GMT)

   Title : Re: [E-devel] Trouble with map block


   On Thu, 11 Jul 2013 15:10:18 + (GMT) Artem Popov
   said:
   if i change color2 to be dark and move the light back (z - -1000 or bigger)
   then it works exactly as expected for me. maybe its a bug fixed in git by
   now?
   
   Raster,
   
   
   thank you for your reply, but the problem is still exist.
   
   If I set color2 to 0 0 0 or another value near that (like 15 15 1
etc.), the RECT is not visible.
   
   The color property do nothing.
   
   I  think  that when calculating the brightness of RECT, color2 plays a
   different role than indicated in the documentation.
   
   Moving of the light source does not change the situation
(tested values ​​of -500, -1000, -5, -50).
   
   Example file is attached.
   
   
   Artem Popov
   
   
   --- Original Message ---
   
   Sender : Carsten Haitzler
   
   Date : Jul 11, 2013 13:08 (GMT)
   
   Title : Re: [E-devel] Trouble with map block
   
   
   On Thu, 11 Jul 2013 12:55:34 + (GMT) Artem Popov
   said:
   color2 is the DIMMEST it can be... this is ambient light. ie black or
   no
   light from light source. if it is 250 as in your example.. u wont even
   see
   it
   get dark. you see a bright rect all the time - just SLIGHTLY getting
   darker
   (255 - 250 and back). set color2 to be 0 0 0 and u'll see it shade.
   you ALSO have another problem.. your light source is VERY close to the
rect. light brightness is calculated at the vertices PER vertex. this is
   the
case because it is gouraud shaded. that means that color is interplated
between the
   vertexes. if your light is in the middle of the rect but VERY close to
   it
   (and
   it is - just 10 pixels away) then the verticies will be at steep angles
   to
   the
   light point and thus dark UNTIL it rotates, then the edges that are not
   roated
   are lighter as they rotate to face the light and those far in the
   distance
   point further away and thus get dark. try zplane for the pointofview
   (light
   too) as -500 or -1000 and see. :)
   
   Raster,
   
   
   i changed color values - Es ist egal.
   
   Moreover,  if  color2  value  dimmer than 255 255 255, light
   attenuates.
   Even
if color not defined (default  - 255 255 255 255).
   
   you can see that in attachment.
   
   
   --- Original Message ---
   
   Sender : Carsten Haitzler
   
   Date : Jul 11, 2013 04:04 (GMT)
   
   Title : Re: [E-devel] Trouble with map block
   
   
   On Tue, 09 Jul 2013 14:51:40 + (GMT) Artem Popov
   said:
   you set both color and color2... color is the light color, color2
   is
   the
   ambient   light...   color2...   should  be  always  dimmer  than
   color...  you're
   setting up the impossible... ie ambient light is brighter than the
   lightsource. :)
   
   Hi guys,
   
   
   There is trouble with a map block using, i think. When i
   rotate
   some
rect, the illumination of the part decreases and if you make any
   change
   with
the image (change the state, resize the window).
   If the color1 and color2 of the light source are equal to 255
   255
   255
   there
   is no changes, but if color is 254 254 254, light attenuates,
   i
   don't
   know
   why. Is that a bug?
   Run the file map.edc to see this (video-file attached).
   
   Best Regards,
   
   Artem Popov
   [SeenTimeChecker?
do=58004ed604205cf3d8d146de8eccbd79d40f5e37d213a000e77f3ff7
   
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1
   ed6b0
   22630
67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]
   --
   -  Codito,  ergo  sum  -  I  code,  therefore  I am
   --
   The Rasterman (Carsten Haitzler)ras...@rasterman.com
   
   
   
   Best Regards,
   
   Artem Popov
   
   Lead Engineer, Advanced Computing Lab
   
   
   Samsung Ukraine Research  Development Center
   
   57, Lva Tolstogo St., Kyiv 01032, Ukraine
   Phone : +380 (66) 618-60-19
   
   E-Mail : [1]artem.po...@samsung.com
   
   
   [cid:BEI0XT4NZ5JE

Re: [E-devel] Trouble with map block

2013-07-11 Thread Artem Popov

   Raster,


   thank you for your reply, but the problem is still exist.

   If I set color2 to 0 0 0 or another value near that (like 15 15 1 etc.),
   the RECT is not visible.

   The color property do nothing.

   I  think  that when calculating the brightness of RECT, color2 plays a
   different role than indicated in the documentation.

   Moving of the light source does not change the situation
(tested values ​​of -500, -1000, -5, -50).

   Example file is attached.


   Artem Popov


   --- Original Message ---

   Sender : Carsten Haitzlerras...@rasterman.com

   Date : Jul 11, 2013 13:08 (GMT)

   Title : Re: [E-devel] Trouble with map block


   On Thu, 11 Jul 2013 12:55:34 + (GMT) Artem Popov
   said:
   color2 is the DIMMEST it can be... this is ambient light. ie black or no
   light from light source. if it is 250 as in your example.. u wont even see
   it
   get dark. you see a bright rect all the time - just SLIGHTLY getting darker
   (255 - 250 and back). set color2 to be 0 0 0 and u'll see it shade.
   you ALSO have another problem.. your light source is VERY close to the rect.
   light brightness is calculated at the vertices PER vertex. this is the case
   because it is gouraud shaded. that means that color is interplated between
   the
   vertexes. if your light is in the middle of the rect but VERY close to it
   (and
   it is - just 10 pixels away) then the verticies will be at steep angles to
   the
   light point and thus dark UNTIL it rotates, then the edges that are not
   roated
   are lighter as they rotate to face the light and those far in the distance
   point further away and thus get dark. try zplane for the pointofview (light
   too) as -500 or -1000 and see. :)
   
   Raster,
   
   
   i changed color values - Es ist egal.
   
   Moreover, if color2 value dimmer than 255 255 255, light attenuates.
   Even
if color not defined (default  - 255 255 255 255).
   
   you can see that in attachment.
   
   
   --- Original Message ---
   
   Sender : Carsten Haitzler
   
   Date : Jul 11, 2013 04:04 (GMT)
   
   Title : Re: [E-devel] Trouble with map block
   
   
   On Tue, 09 Jul 2013 14:51:40 + (GMT) Artem Popov
   said:
   you set both color and color2... color is the light color, color2 is
   the
   ambient   light...   color2...   should  be  always  dimmer  than
   color...  you're
   setting up the impossible... ie ambient light is brighter than the
   lightsource. :)
   
   Hi guys,
   
   
   There is trouble with a map block using, i think. When i rotate
   some
rect, the illumination of the part decreases and if you make any
   change
   with
the image (change the state, resize the window).
   If the color1 and color2 of the light source are equal to 255 255
   255
   there
   is no changes, but if color is 254 254 254, light attenuates, i
   don't
   know
   why. Is that a bug?
   Run the file map.edc to see this (video-file attached).
   
   Best Regards,
   
   Artem Popov
   [SeenTimeChecker?
do=58004ed604205cf3d8d146de8eccbd79d40f5e37d213a000e77f3ff7
   
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1ed6b0
   22630
67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]
   --
   -  Codito,  ergo  sum  -  I  code,  therefore  I am
   --
   The Rasterman (Carsten Haitzler)ras...@rasterman.com
   
   
   
   Best Regards,
   
   Artem Popov
   
   Lead Engineer, Advanced Computing Lab
   
   
   Samsung Ukraine Research  Development Center
   
   57, Lva Tolstogo St., Kyiv 01032, Ukraine
   Phone : +380 (66) 618-60-19
   
   E-Mail : [1]artem.po...@samsung.com
   
   
   [cid:BEI0XT4NZ5JE@namo.co.kr]
   
   [SeenTimeChecker?
do=7313f16f49f85e196cd4961a3ec2b474a2d4e0f32297c536e77f3ff7
   
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1ed6b022630
67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]
   
References
   
   1. mailto:vartem.po...@samsung.com
   --
   - Codito, ergo sum - I code, therefore I am --
   The Rasterman (Carsten Haitzler)ras...@rasterman.com


   [SeenTimeChecker?do=7313f16f49f85e19d8f0df9aa065a9e79edfd488ca5cbc58e77f3ff7
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1ed6b022630
   67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]


Map_Test.tar.gz
Description: Binary data
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http

[E-devel] [Patch] Patch for normal scaling in elm_panel.c widget

2012-06-29 Thread Artem Popov


   Problem:

   Ticket #656 (new Bug) . The whole test window size will just grow larger and
   larger on each _theme_hook called.

   Easy to reproduce: 1. Open elementary_test's panel test 2. Do something that
   issues a theme_hook (change scale etc)

   Commit log:

   Added Patch for normal scaling elm_panel widget.

   [cid:Z5JE7EUABGFC@namo.co.kr]

   [SeenTimeChecker?do=b38c84cc73dda21538d2c80e3d1511c6e0a963c86c00fa02e77f3ff7
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1ed6b022630
   67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]
201206291540449_BEI0XT4N.gif

elm_panel.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] Patch for test case for panel widget (genlist expand automatically)

2012-06-29 Thread Artem Popov

   Problem:

   In test case for panel widget genlist not expand automatically

   Commit log:

   Added patch for test case for panel widget (genlist expand automatically).



   [cid:0GAN05W5Y5W7@namo.co.kr]

   [SeenTimeChecker?do=b38c84cc73dda21572e934889cac38a3e704bb6ff54e706ae77f3ff7
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1ed6b022630
   67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]
201206291543405_LLKJ9INH.gif

test_panel.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] Added new style for hoversel (hoversel_horizontal)

2012-06-29 Thread Artem Popov

   Problem:

   Ticket #838 (new Bug). Items appear without background on a horiz-hoversel.
   Just add: elm_hoversel_horizontal_set(bt, EINA_TRUE); to the first hoversel
   added in test_hoversel.c then try to open it.

   Items appear without black background.

   Commit log:

   Added new style for hoversel (hoversel_horizontal).


   [cid:ZQS8QVYHLCGF@namo.co.kr]

   [SeenTimeChecker?do=b38c84cc73dda215427f1fcf3445e15857852e3a78baab3ee77f3ff7
   f8715167ddc79e3cd10304db25139e580ce36374e458eb91567068af8048f33cf1ed6b022630
   67d8b8f027b1385d1dc03090c255b34ca8e8a5708c9fcf878f9a26ce15a0]
201206291548585_ZPZQ39MR.gif

hover.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Fwd: [Patch] elm_toolbar add signals patch.

2012-06-22 Thread Artem Popov
Problems:
   For new style of toolbar (align icon and text to center of item) are 
necessary some signals (elm,state,text,visible, elm,state,text,hidden, 
elm,state,icon,visible, elm,state,icon,hidden)
Commit log:
   Elementary toolbar: Added signals for new style of toolbar (align icon and 
text to center of item).

Best Regards,
Artem Popov.

elm_toolbar.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Fwd: [Patch] toolbar widget new style patch.

2012-06-22 Thread Artem Popov
Problems:
   New style for toolbar, where icon and text are align to center of item.
Commit log:
   Elementary toolbar: Added new style for toolbar (where icon and text are 
align to center of item).

Best Regards,
Artem Popov

toolbar.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] elm_toolbar add signals patch.

2012-06-21 Thread Artem Popov
Problems:
   For new style of toolbar (align icon and text to center of item) are 
necessary some signals (elm,state,text,visible and elm,state,icon,visible)
Commit log:
   Elementary toolbar: Added signals for new style of toolbar (align icon and 
text to center of item).

Best Regards,
Artem Popov.

elm_toolbar.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] toolbar widget new style patch.

2012-06-21 Thread Artem Popov
Problems:
   New style for toolbar, where icon and text are align to center of item.
Commit log:
   Elementary toolbar: Added new style for toolbar (where icon and text are 
align to center of item).

Best Regards,
Artem Popov

toolbar.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel