From b6a50574c6266ba315ce8eda8aad3c13fc4d0022 Mon Sep 17 00:00:00 2001
From: Francois Cartegnie <fcvlcdev@free.fr>
Date: Mon, 11 Apr 2022 12:17:22 +0200
Subject: [PATCH] meta_engine: fix junk at end or raw unterminated ID3 text

(cherry picked from commit 4f74c5ca37117cab4071df392c47611317779b48)
---
 modules/meta_engine/ID3Text.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/meta_engine/ID3Text.h b/modules/meta_engine/ID3Text.h
index 9ca2af052ec6..b1fa19d872f4 100644
--- a/modules/meta_engine/ID3Text.h
+++ b/modules/meta_engine/ID3Text.h
@@ -47,7 +47,7 @@ static const char * ID3TextConv( const uint8_t *p_buf, size_t i_buf,
                     psz = p_alloc = (char *) malloc( i_buf + 1 );
                     if( p_alloc )
                     {
-                        memcpy( p_alloc, p_buf, i_buf - 1 );
+                        memcpy( p_alloc, p_buf, i_buf );
                         p_alloc[i_buf] = '\0';
                     }
                 }
-- 
GitLab