From 376f1c73b8335fb09714dc56ce0f1ebc5f9ee8b9 Mon Sep 17 00:00:00 2001 From: Marc Schoolderman Date: Tue, 19 Oct 2021 22:59:45 +0200 Subject: [PATCH] catch evil tags being hidden by id3v2.4's unsynchronization scheme --- id3v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/id3v2.c b/id3v2.c index 7702187..5ab5dcd 100644 --- a/id3v2.c +++ b/id3v2.c @@ -239,8 +239,10 @@ void *ID3_readf(const char *fname, size_t *tagsize) pad = size; /* check semantics of tag */ size = calcsize(buf, size); - if( rh.ver == 4 && size > 0 ) /* v2.4: just ignore the global UNSYNC */ + if( rh.ver == 4 && size > 0 ) { /* v2.4: ignore the global UNSYNC */ size = unsync_frames_v2_4(buf, size); + size = calcsize(buf, size); + } if(tagsize) *tagsize = size;