summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 18:56:43 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 18:56:43 +0900
commitb2809026bbafc228d437aa4654208f2399cbc4b7 (patch)
treebb43b92c03215f5a625c2339ee30c595fa10c83c
parentb3b0411a05165b121da46ef9718e8a1d628a76bd (diff)
downloadefl-b2809026bbafc228d437aa4654208f2399cbc4b7.tar.gz
elm cnp - check if selbuf is null or not and skip copying if null
this should fix CID 1377536
-rw-r--r--src/lib/elementary/elm_cnp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 80e95e9649..b600e90d0e 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -4431,7 +4431,7 @@ _local_elm_cnp_selection_set(Evas_Object *obj EINA_UNUSED,
free(_local_selinfo[selection].sel.buf);
_local_selinfo[selection].format = format;
_local_selinfo[selection].sel.buf = malloc(buflen + 1);
- if (_local_selinfo[selection].sel.buf)
+ if ((_local_selinfo[selection].sel.buf) && (selbuf))
{
memcpy(_local_selinfo[selection].sel.buf, selbuf, buflen);
_local_selinfo[selection].sel.buf[buflen] = 0;