Commit c748d12b authored by Josh Coalson's avatar Josh Coalson
Browse files

fix bug where comparing vorbis comment field names were not case insensitive

parent a0ac09ad
......@@ -1739,7 +1739,8 @@ FLAC__bool set_vc_field(const char *filename, FLAC__StreamMetadata *block, const
FLAC__bool field_name_matches_entry(const char *field_name, unsigned field_name_length, const FLAC__StreamMetadata_VorbisComment_Entry *entry)
{
return (0 != memchr(entry->entry, '=', entry->length) && 0 == strncmp(field_name, entry->entry, field_name_length));
FLAC__byte *eq = memchr(entry->entry, '=', entry->length);
return (0 != eq && (unsigned)(eq-entry->entry) == field_name_length && 0 == strncasecmp(field_name, entry->entry, field_name_length));
}
void hexdump(const char *filename, const FLAC__byte *buf, unsigned bytes, const char *indent)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment