The wma audio format handler parses the entries of the ASF content
description object and interprets its fifth field as the comment tag.
This is wrong, since this field actually corresponds to the rating
information, which is usually unused. The correct field to examine
is #4.
static void read_asf_tags(const char *buf, int buf_size, struct taginfo *ti)
{
const char *p, *end = buf + buf_size, *q;
static void read_asf_tags(const char *buf, int buf_size, struct taginfo *ti)
{
const char *p, *end = buf + buf_size, *q;
- uint16_t len1, len2, len3, len4, len5;
+ uint16_t len1, len2, len3, len4;
p = search_pattern(comment_header, sizeof(comment_header),
buf, buf_size);
p = search_pattern(comment_header, sizeof(comment_header),
buf, buf_size);
p += 2;
len4 = read_u16(p);
p += 2;
p += 2;
len4 = read_u16(p);
p += 2;
+ /* ignore length of the rating information */
p += 2;
if (p + len1 >= end)
goto next;
p += 2;
if (p + len1 >= end)
goto next;
if (p + len2 >= end)
goto next;
ti->artist = get_str16(p, len2);
if (p + len2 >= end)
goto next;
ti->artist = get_str16(p, len2);
- p += len2 + len3 + len4;
- if (p + len5 >= end)
+ p += len2 + len3;
+ if (p + len4 >= end)
- ti->comment = get_str16(p, len5);
+ ti->comment = get_str16(p, len4);
next:
p = search_pattern(extended_content_header, sizeof(extended_content_header),
buf, buf_size);
next:
p = search_pattern(extended_content_header, sizeof(extended_content_header),
buf, buf_size);