diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-05-14 15:22:00 +0200 |
---|---|---|
committer | Juan A. Suarez Romero <jasuarez@igalia.com> | 2013-05-15 09:28:44 +0200 |
commit | a406cd005dfe4bfd0bb817e67e6b6b2d8f20c0ed (patch) | |
tree | 9ac635bb47bdfed1d4fc49df10bb9c0f7108b7c7 | |
parent | 5cec516920a1d6e3a99045745584b63e65d5aaaa (diff) |
bliptv: Fix crash when browsing on 64-bit platforms
gsize on 64-bit platforms is a 64-bit integer. Trying to fit a 64-bit
integer in the 32-bit integer we were passed trashed the pointer of the
previous return parameter, in this case the buffer's address.
Pass a pointer to correctly sized integer to avoid this memory
corruption and cast it later as needed.
https://bugzilla.gnome.org/show_bug.cgi?id=700297
-rw-r--r-- | src/bliptv/grl-bliptv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bliptv/grl-bliptv.c b/src/bliptv/grl-bliptv.c index b1dcf1b..543378b 100644 --- a/src/bliptv/grl-bliptv.c +++ b/src/bliptv/grl-bliptv.c @@ -258,7 +258,7 @@ call_raw_async_cb (GObject * source_object, xmlXPathObjectPtr obj = NULL; gint i, nb_items = 0; gchar *content = NULL; - gint length; + gsize length; GRL_DEBUG ("Response id=%u", op->operation_id); @@ -269,12 +269,12 @@ call_raw_async_cb (GObject * source_object, if (!grl_net_wc_request_finish (GRL_NET_WC (source_object), res, &content, - (gsize *) &length, + &length, NULL)) { goto finalize; } - doc = xmlParseMemory (content, length); + doc = xmlParseMemory (content, (gint) length); if (!doc) goto finalize; |