shithub: libtags

Download patch

ref: 65591113f551b4506fe16fe5a9a11b5ea46138a5
parent: 5e8b0c6890f818951b947a9986f69364bc629b0c
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Mar 4 13:11:11 EST 2024

flac: fix possible mime buffer overflow (used wrong offset)

--- a/flac.c
+++ b/flac.c
@@ -45,7 +45,7 @@
 			sz -= 8;
 			n = beuint(&d[4]);
 			mime = ctx->buf+20;
-			if(n >= sz || n >= ctx->bufsz-1 || ctx->read(ctx, mime, n) != n)
+			if(n >= sz || n >= ctx->bufsz-20 || ctx->read(ctx, mime, n) != n)
 				return -1;
 			sz -= n;
 			mime[n] = 0;