From 4269ac28566229156d05d8efe5f97e66b113bcf1 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Sat, 5 Jul 2008 16:37:27 +0000 Subject: Properly set padding to 0 in mhod type 3 git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2033 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 4 ++++ src/db-artwork-writer.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2f70f6a..c84bb12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-05 Christophe Fergeau + + * src/db-artwork-writer.c: properly set padding to 0 in mhods type 3 + 2008-07-05 Christophe Fergeau * src/ithumb-writer.c: don't leak the list of image formats we get diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c index e5ca65a..00d62a6 100644 --- a/src/db-artwork-writer.c +++ b/src/db-artwork-writer.c @@ -333,6 +333,7 @@ write_mhod_type_3 (gchar *string, iPodBuffer *buffer) strp[i] = get_gint16 (utf16[i], buffer->byte_order); } g_free (utf16); + memset (mhod->string + g2l*len, 0, padding); break; case G_BIG_ENDIAN: mhod->encoding = 1; /* 8 bit field, no need to byteswap */ @@ -353,6 +354,7 @@ write_mhod_type_3 (gchar *string, iPodBuffer *buffer) return -1; } memcpy (mhod->string, string, len); + memset (mhod->string + len, 0, padding); total_bytes += (len+padding); } mhod->total_len = get_gint32 (total_bytes, buffer->byte_order); -- cgit