[vlc-commits] input: fix check for unnamed attachment, potential read overflow

Rémi Denis-Courmont git at videolan.org
Wed Oct 21 18:45:22 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 15 13:19:39 2015 +0300| [6c9db1f8e848e00d927acef356155cc07221e9ae] | committer: Jean-Baptiste Kempf

input: fix check for unnamed attachment, potential read overflow

Pointed-out-by: <hugh1234 at mail.ustc.edu.cn>
(cherry picked from commit 12c11c31d9e791060f541eb5ca42c20f4c130ceb)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=6c9db1f8e848e00d927acef356155cc07221e9ae
---

 src/input/input.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 9832ed1..6ca3cd9 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1037,7 +1037,7 @@ static void LoadSubtitles( input_thread_t *p_input )
         if( !a )
             continue;
         char *psz_mrl;
-        if( a->psz_name[i] &&
+        if( a->psz_name[0] &&
             asprintf( &psz_mrl, "attachment://%s", a->psz_name ) >= 0 )
         {
             var_SetString( p_input, "sub-description", a->psz_description ? a->psz_description : "");



More information about the vlc-commits mailing list