seahorse r2422 - in trunk: . gkr libseahorse pgp pkcs11 src ssh
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2422 - in trunk: . gkr libseahorse pgp pkcs11 src ssh
- Date: Sun, 31 Aug 2008 20:20:10 +0000 (UTC)
Author: nnielsen
Date: Sun Aug 31 20:20:10 2008
New Revision: 2422
URL: http://svn.gnome.org/viewvc/seahorse?rev=2422&view=rev
Log:
* libseahorse/seahorse-util.c:
* libseahorse/seahorse-util.h:
* src/seahorse-key-manager.vala: Fix double free. See bug #547918
Modified:
trunk/ChangeLog
trunk/gkr/vala-build.stamp
trunk/libseahorse/libseahorse-c.vapi
trunk/libseahorse/seahorse-util.c
trunk/libseahorse/seahorse-util.h
trunk/pgp/vala-build.stamp
trunk/pkcs11/vala-build.stamp
trunk/src/seahorse-key-manager-store.c
trunk/src/seahorse-key-manager.c
trunk/src/seahorse-key-manager.vala
trunk/src/vala-build.stamp
trunk/ssh/vala-build.stamp
Modified: trunk/gkr/vala-build.stamp
==============================================================================
--- trunk/gkr/vala-build.stamp (original)
+++ trunk/gkr/vala-build.stamp Sun Aug 31 20:20:10 2008
@@ -1 +1 @@
-1220209490
+1220213771
Modified: trunk/libseahorse/libseahorse-c.vapi
==============================================================================
--- trunk/libseahorse/libseahorse-c.vapi (original)
+++ trunk/libseahorse/libseahorse-c.vapi Sun Aug 31 20:20:10 2008
@@ -174,6 +174,8 @@
[CCode (array_length_type = "guint")]
public uchar[] read_to_memory(GLib.InputStream input);
+
+ public GLib.MemoryInputStream memory_input_string(string text, long len);
}
[CCode (cheader_filename = "seahorse-gconf.h", cprefix = "SeahorseGConf", lower_case_cprefix = "seahorse_gconf_")]
Modified: trunk/libseahorse/seahorse-util.c
==============================================================================
--- trunk/libseahorse/seahorse-util.c (original)
+++ trunk/libseahorse/seahorse-util.c Sun Aug 31 20:20:10 2008
@@ -325,6 +325,13 @@
return copied;
}
+GMemoryInputStream*
+seahorse_util_memory_input_string (const gchar *string, gsize length)
+{
+ g_return_val_if_fail (string, NULL);
+ return G_MEMORY_INPUT_STREAM (g_memory_input_stream_new_from_data (g_strndup (string, length), length, g_free));
+}
+
gsize
seahorse_util_memory_output_length (GMemoryOutputStream *output)
{
Modified: trunk/libseahorse/seahorse-util.h
==============================================================================
--- trunk/libseahorse/seahorse-util.h (original)
+++ trunk/libseahorse/seahorse-util.h Sun Aug 31 20:20:10 2008
@@ -76,6 +76,9 @@
const gchar *start,
const gchar* end);
+GMemoryInputStream*
+ seahorse_util_memory_input_string (const gchar *string, gsize length);
+
gsize seahorse_util_memory_output_length (GMemoryOutputStream *output);
gboolean seahorse_util_print_fd (int fd,
Modified: trunk/pgp/vala-build.stamp
==============================================================================
--- trunk/pgp/vala-build.stamp (original)
+++ trunk/pgp/vala-build.stamp Sun Aug 31 20:20:10 2008
@@ -1 +1 @@
-1220209523
+1220213805
Modified: trunk/pkcs11/vala-build.stamp
==============================================================================
--- trunk/pkcs11/vala-build.stamp (original)
+++ trunk/pkcs11/vala-build.stamp Sun Aug 31 20:20:10 2008
@@ -1 +1 @@
-1220210715
+1220213792
Modified: trunk/src/seahorse-key-manager-store.c
==============================================================================
--- trunk/src/seahorse-key-manager-store.c (original)
+++ trunk/src/seahorse-key-manager-store.c Sun Aug 31 20:20:10 2008
@@ -68,7 +68,7 @@
{ "type", G_TYPE_STRING, "type" },
{ "expires-str", G_TYPE_STRING, "expires" },
{ "validity", G_TYPE_INT, "validity" },
- { "expires", G_TYPE_LONG, "expires" },
+ { "expires", G_TYPE_ULONG, "expires" },
{ "trust", G_TYPE_INT, "trust" }
};
Modified: trunk/src/seahorse-key-manager.c
==============================================================================
--- trunk/src/seahorse-key-manager.c (original)
+++ trunk/src/seahorse-key-manager.c Sun Aug 31 20:20:10 2008
@@ -693,11 +693,7 @@
_tmp0 = NULL;
sksrc = (_tmp0 = seahorse_context_find_source (seahorse_context_for_app (), ktype, SEAHORSE_LOCATION_LOCAL), (_tmp0 == NULL ? NULL : g_object_ref (_tmp0)));
g_return_if_fail (sksrc != NULL);
- /*
- * BUG: We cast to get around this bug:
- * http://bugzilla.gnome.org/show_bug.cgi?id=540662
- */
- input = G_MEMORY_INPUT_STREAM (((GMemoryInputStream*) (g_memory_input_stream_new_from_data (text, len, g_free))));
+ input = seahorse_util_memory_input_string (text, len);
op = seahorse_source_import (sksrc, G_INPUT_STREAM (input));
seahorse_progress_show (op, _ ("Importing Keys"), TRUE);
seahorse_operation_watch (op, _seahorse_key_manager_imported_keys_seahorse_done_func, self, NULL, NULL);
Modified: trunk/src/seahorse-key-manager.vala
==============================================================================
--- trunk/src/seahorse-key-manager.vala (original)
+++ trunk/src/seahorse-key-manager.vala Sun Aug 31 20:20:10 2008
@@ -543,11 +543,7 @@
Source sksrc = Context.for_app().find_source (ktype, Location.LOCAL);
return_if_fail (sksrc != null);
- /*
- * BUG: We cast to get around this bug:
- * http://bugzilla.gnome.org/show_bug.cgi?id=540662
- */
- var input = (MemoryInputStream)new MemoryInputStream.from_data (text, len, g_free);
+ var input = Util.memory_input_string (text, len);
Operation op = sksrc.import (input);
Progress.show (op, _("Importing Keys"), true);
Modified: trunk/src/vala-build.stamp
==============================================================================
--- trunk/src/vala-build.stamp (original)
+++ trunk/src/vala-build.stamp Sun Aug 31 20:20:10 2008
@@ -1 +1 @@
-1219848562
+1220213883
Modified: trunk/ssh/vala-build.stamp
==============================================================================
--- trunk/ssh/vala-build.stamp (original)
+++ trunk/ssh/vala-build.stamp Sun Aug 31 20:20:10 2008
@@ -1 +1 @@
-1220209582
+1220213856
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]