tolerant match_field

This commit is contained in:
Frédéric Mangano 2013-01-01 17:41:20 +01:00
parent 48b9e7b931
commit f8c767fc9a

View File

@ -88,7 +88,8 @@ int render_tags(opus_tags *tags, ogg_packet *op){
}
int match_field(const char *comment, uint32_t len, const char *field){
size_t field_len = strlen(field);
size_t field_len;
for(field_len = 0; field[field_len] != '\0' && field[field_len] != '='; field_len++);
if(len <= field_len)
return 0;
if(comment[field_len] != '=')