discomfitor pushed a commit to branch efl-1.15.

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

commit e004a76d1967e6cc0408c100f5623fd074483f64
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