[discident-glib] uncompress bug fix
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [discident-glib] uncompress bug fix
- Date: Wed, 5 Dec 2012 23:39:11 +0000 (UTC)
commit 5673e09abd5920ecee51b329f96af6bb855eb17a
Author: Bastien Nocera <hadess hadess net>
Date: Thu Dec 6 00:27:36 2012 +0100
uncompress bug fix
discident-glib/discident-ean-glib.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/discident-glib/discident-ean-glib.c b/discident-glib/discident-ean-glib.c
index 16ddc6b..20b48b7 100644
--- a/discident-glib/discident-ean-glib.c
+++ b/discident-glib/discident-ean-glib.c
@@ -218,13 +218,16 @@ uncompress (const char *data,
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
NULL, NULL)) {
g_object_unref (output);
- /* Probably not compressed */
- return g_strndup (data, len);
+ return NULL;
}
ret = g_strdup (g_memory_output_stream_get_data ((GMemoryOutputStream *) output));
g_object_unref (output);
+ /* Probably not compressed */
+ if (ret == NULL)
+ return g_strndup (data, len);
+
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]