summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteuf <teuf@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-07-05 16:37:27 +0000
committerteuf <teuf@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-07-05 16:37:27 +0000
commit6302a6841007a91618083a065893a4d596d69900 (patch)
tree77264d8d4a8e8f2c5ac21c3f9bb360dbd07611f6
parentfeed2d211adcb756cd9da36db8fc485401bf00b0 (diff)
downloadlibgpod-6302a6841007a91618083a065893a4d596d69900.tar.gz
libgpod-6302a6841007a91618083a065893a4d596d69900.tar.xz
libgpod-6302a6841007a91618083a065893a4d596d69900.zip
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
-rw-r--r--ChangeLog4
-rw-r--r--src/db-artwork-writer.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f70f6a..c84bb12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2008-07-05 Christophe Fergeau <teuf@gnome.org>
+ * src/db-artwork-writer.c: properly set padding to 0 in mhods type 3
+
+2008-07-05 Christophe Fergeau <teuf@gnome.org>
+
* src/ithumb-writer.c: don't leak the list of image formats we get
from the ItdbDevice
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);