ref: 3bc7b61cb1c7c34b4f1ad39771febe6ea61b5094
parent: 2c7c27be5decdf67bd0770b2ddce538e5d584739
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Mar 5 20:25:27 EST 2024
id3v2: ignore images with nonsensical sizes
--- a/id3v2.c
+++ b/id3v2.c
@@ -195,7 +195,8 @@
break;
}
}
- tagscallcb(ctx, Timage, "PIC", strcmp(b, "JPG") == 0 ? "image/jpeg" : "image/png", offset+n, tsz-n, f);
+ if(tsz > n)
+ tagscallcb(ctx, Timage, "PIC", strcmp(b, "JPG") == 0 ? "image/jpeg" : "image/png", offset+n, tsz-n, f);
n = 256;
}
}else if(strcmp((char*)d, "RVA2") == 0 && tsz >= 6+5){