discomfitor pushed a commit to branch master.

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

commit b84085ca8c2a3c3cece834f0f21fe72e48d86263
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Aug 13 15:47:09 2015 -0400

    ecore-wl: do not nul terminate drops
    
    the application can do this based on mime types. we should not be
    nul terminating incremental drop data
    
    @fix
---
 src/lib/ecore_wayland/ecore_wl_dnd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c 
b/src/lib/ecore_wayland/ecore_wl_dnd.c
index 5165328..20c4129 100644
--- a/src/lib/ecore_wayland/ecore_wl_dnd.c
+++ b/src/lib/ecore_wayland/ecore_wl_dnd.c
@@ -670,14 +670,13 @@ _ecore_wl_dnd_selection_data_read(void *data, 
Ecore_Fd_Handler *fd_handler EINA_
      }
    else
      {
-        event->data = malloc(len + 1);
+        event->data = malloc(len);
         if (!event->data)
           {
              free(event);
              return ECORE_CALLBACK_CANCEL;
           }
-        strncpy(event->data, buffer, len);
-        event->data[len] = '\0';
+        memcpy(event->data, buffer, len);
         event->len = len;
         event->done = EINA_FALSE;
         ret = ECORE_CALLBACK_RENEW;

-- 


Reply via email to