# HG changeset patch # User nenolod # Date 1150189168 25200 # Node ID 62726fb1cb3becec7903a31d8671f42b78f49c91 # Parent 4abdab413cf6e3baf744099dbe4558a79b938b73 [svn] - fix potential crashing on malformed ID3v2 tags diff -r 4abdab413cf6 -r 62726fb1cb3b ChangeLog --- a/ChangeLog Mon Jun 12 03:25:29 2006 -0700 +++ b/ChangeLog Tue Jun 13 01:59:28 2006 -0700 @@ -1,3 +1,11 @@ +2006-06-12 10:25:29 +0000 Tony Vroon + revision [1292] + Updated japanese translation by dai, closes bug #384. + + Changes: Modified: + +826 -811 trunk/po/ja.po + + 2006-06-12 07:56:00 +0000 William Pitcock revision [1290] - new UI for scrobbler configuration UI diff -r 4abdab413cf6 -r 62726fb1cb3b Plugins/General/scrobbler/tags/id3v2.c --- a/Plugins/General/scrobbler/tags/id3v2.c Mon Jun 12 03:25:29 2006 -0700 +++ b/Plugins/General/scrobbler/tags/id3v2.c Tue Jun 13 01:59:28 2006 -0700 @@ -430,6 +430,10 @@ utf = realloc(utf, framedata->len); strcpy((char*)utf, (char*)data); } + + if (utf == NULL) + return framedata; + framedata->len = strlen((char*)utf) + 1; framedata->data = realloc(framedata->data, framedata->len); strcpy((char*)framedata->data, (char*)utf); diff -r 4abdab413cf6 -r 62726fb1cb3b Plugins/General/scrobbler/tags/unicode.c --- a/Plugins/General/scrobbler/tags/unicode.c Mon Jun 12 03:25:29 2006 -0700 +++ b/Plugins/General/scrobbler/tags/unicode.c Tue Jun 13 01:59:28 2006 -0700 @@ -31,6 +31,9 @@ int j = 0; wchar_t *mem; + if (utf == NULL) + return NULL; + mem = calloc(sizeof(wchar_t) * (memsize + 1), 1); for(i = 0; i < memsize;) @@ -88,6 +91,9 @@ { size_t i; unsigned char *mem, *ptr; + + if (wchar == NULL) + return NULL; mem = calloc(memsize * 6 + 1, 1); ptr = mem;