git: 9front

Download patch

ref: ac6597758808dd552609ee5782dd433196d2d229
parent: 6e67ce955b1f432f2d1dc85909553e65a511b8b8
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Feb 19 13:53:03 EST 2024

libtags/m4a: "gnre" is non-standard id3v1 style (non-text) - check before reading the value

--- a/sys/src/cmd/audio/libtags/m4a.c
+++ b/sys/src/cmd/audio/libtags/m4a.c
@@ -137,7 +137,7 @@
 			sz -= 4;
 			snprint((char*)d, ctx->bufsz, "%d", beuint(d));
 			txtcb(ctx, type, "", d);
-		}else if(type == Tgenre){
+		}else if(type == Tgenre && dtype != 1){
 			if(ctx->read(ctx, d, 2) != 2)
 				return -1;
 			sz -= 2;
--