diff options
author | Christophe Fergeau <teuf@gnome.org> | 2008-07-05 16:37:27 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2008-07-05 16:37:27 +0000 |
commit | 4269ac28566229156d05d8efe5f97e66b113bcf1 (patch) | |
tree | 77264d8d4a8e8f2c5ac21c3f9bb360dbd07611f6 | |
parent | 2b69a7dc412b444d807ffb21eb226ca23635e778 (diff) | |
download | libgpod-4269ac28566229156d05d8efe5f97e66b113bcf1.tar.gz libgpod-4269ac28566229156d05d8efe5f97e66b113bcf1.tar.xz libgpod-4269ac28566229156d05d8efe5f97e66b113bcf1.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-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/db-artwork-writer.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -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); |