shithub: libtags

Download patch

ref: 8f4bfe49e034694ac1d79f89130ed0566845da56
parent: 013e83940de00cb4ee983ec2970946e8df5bc620
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Mar 6 13:54:49 EST 2024

id3v2: only jump to another header if it follows the last one, to avoid possible loops

--- a/id3v2.c
+++ b/id3v2.c
@@ -467,7 +467,7 @@
 			newpos = ctx->seek(ctx, (char*)b - ctx->buf + offset + exsz, 0);
 			if(ctx->read(ctx, d, sizeof(d)) != sizeof(d))
 				return 0;
-			if(isid3(d) && newpos != oldpos){
+			if(isid3(d) && newpos > oldpos){
 				oldpos = newpos;
 				goto header;
 			}