[vlc-commits] player: fix crash caused by use after free

Victorien Le Couviour--Tuffet git at videolan.org
Fri Jun 21 14:42:18 CEST 2019


vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Wed Jun 19 21:34:56 2019 +0200| [b0637a0769533a714714f4496d5beadb947ffeaa] | committer: Thomas Guillem

player: fix crash caused by use after free

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

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

diff --git a/src/input/player.c b/src/input/player.c
index b37fd8aa2e..a038ae67d6 100644
--- a/src/input/player.c
+++ b/src/input/player.c
@@ -3326,7 +3326,8 @@ vlc_player_VoutOSDCallback(vlc_object_t *this, const char *var,
             newval.psz_string : var_GetString(vout, "deinterlace-mode");
         vouts_osd_Message(&vout, 1, _("Deinterlace %s (%s)"),
                           on == 1 ? _("On") : _("Off"), mode);
-        free(mode);
+        if (!varmode)
+            free(mode);
     }
 
     else if (strcmp(var, "sub-margin") == 0)



More information about the vlc-commits mailing list