Revision: 2033
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2033&view=rev
Author:   teuf
Date:     2008-07-05 09:37:27 -0700 (Sat, 05 Jul 2008)

Log Message:
-----------
Properly set padding to 0 in mhod type 3

Modified Paths:
--------------
    libgpod/trunk/ChangeLog
    libgpod/trunk/src/db-artwork-writer.c

Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog     2008-07-05 16:37:11 UTC (rev 2032)
+++ libgpod/trunk/ChangeLog     2008-07-05 16:37:27 UTC (rev 2033)
@@ -1,5 +1,9 @@
 2008-07-05  Christophe Fergeau <[EMAIL PROTECTED]>
 
+       * src/db-artwork-writer.c: properly set padding to 0 in mhods type 3
+
+2008-07-05  Christophe Fergeau <[EMAIL PROTECTED]>
+
        * src/ithumb-writer.c: don't leak the list of image formats we get
        from the ItdbDevice
 

Modified: libgpod/trunk/src/db-artwork-writer.c
===================================================================
--- libgpod/trunk/src/db-artwork-writer.c       2008-07-05 16:37:11 UTC (rev 
2032)
+++ libgpod/trunk/src/db-artwork-writer.c       2008-07-05 16:37:27 UTC (rev 
2033)
@@ -333,6 +333,7 @@
                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 @@
                    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);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to