[libdmapsharing] Fix crash in clients when thumbnail is missing; always create thumbnail array, even if 0-length Sign



commit ce9fa7966d81293bbad4840863a68886c52f107e
Author: W. Michael Petullo <mike flyn org>
Date:   Mon Mar 28 09:53:28 2011 -0500

    Fix crash in clients when thumbnail is missing; always create thumbnail array, even if 0-length
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dpap-connection.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dpap-connection.c
index 08cb367..4711a9a 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dpap-connection.c
@@ -120,6 +120,8 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
 	if (filesize) {
 		ptr = g_byte_array_sized_new (filesize);
 		g_byte_array_append (ptr, thumbnail, filesize);
+	} else {
+		ptr = g_byte_array_sized_new (0);
 	}
 
 	g_object_set (record,



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