From f8c767fc9aa48173bc4497a14fb85cf12c55a770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano?= Date: Tue, 1 Jan 2013 17:41:20 +0100 Subject: [PATCH] tolerant match_field --- opustags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opustags.c b/opustags.c index e409845..42929e4 100644 --- a/opustags.c +++ b/opustags.c @@ -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] != '=')