[grilo-plugins] bliptv: Fix crash when browsing on 64-bit platforms
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] bliptv: Fix crash when browsing on 64-bit platforms
- Date: Wed, 15 May 2013 07:34:07 +0000 (UTC)
commit a406cd005dfe4bfd0bb817e67e6b6b2d8f20c0ed
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 14 15:22:00 2013 +0200
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
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]