commit 101d08ae9e18a7ac94c4cfcff61d838ba22642d1
parent a45dc0bcff26b010e8eb6753a9c040b0f88f72b8
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 27 Nov 2010 17:54:44 +0000
fix off by one
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/plugins/id3v23_extractor.c b/src/plugins/id3v23_extractor.c
@@ -288,18 +288,18 @@ EXTRACTOR_id3v23_extract (const unsigned char *data,
switch (data[pos + 10])
{
case 0x00:
- word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14],
- csize - 4, "ISO-8859-1");
+ word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 15],
+ csize - 5, "ISO-8859-1");
break;
case 0x01:
- word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14],
- csize - 4, "UCS-2");
+ word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 15],
+ csize - 5, "UCS-2");
break;
default:
/* bad encoding byte,
try to convert from iso-8859-1 */
- word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14],
- csize - 4, "ISO-8859-1");
+ word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 15],
+ csize - 5, "ISO-8859-1");
break;
}
break;