[seahorse] Fix wrong usage of gdk_property_get()



commit a81db53b5bc589b9fcde3043f76dc0f69340f7c1
Author: Alexander Pyhalov <alp rsu ru>
Date:   Sat Feb 14 00:37:00 2015 +0000

    Fix wrong usage of gdk_property_get()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744503

 libseahorse/seahorse-key-manager-store.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libseahorse/seahorse-key-manager-store.c b/libseahorse/seahorse-key-manager-store.c
index afd95a3..3ee552d 100644
--- a/libseahorse/seahorse-key-manager-store.c
+++ b/libseahorse/seahorse-key-manager-store.c
@@ -269,6 +269,7 @@ xds_get_atom_value (GdkDragContext *context)
 {
        GdkWindow *source_window;
        char *ret;
+       gint len;
 
        g_return_val_if_fail (context != NULL, NULL);
 
@@ -278,9 +279,11 @@ xds_get_atom_value (GdkDragContext *context)
        if (gdk_property_get (source_window,
                              XDS_ATOM, TEXT_ATOM,
                              0, MAX_XDS_ATOM_VAL_LEN,
-                             FALSE, NULL, NULL, NULL,
-                             (unsigned char **) &ret))
+                             FALSE, NULL, NULL, &len,
+                             (unsigned char **) &ret)) {
+               ret[len]='\0';
                return ret;
+       }
 
        return NULL;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]