forked from enlightenment/efl
elm cnp - check if selbuf is null or not and skip copying if null
this should fix CID 1377536
This commit is contained in:
parent
b3b0411a05
commit
b2809026bb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue