[vlc-commits] commit: subsdec: NULL dereference (fix #4125) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Sep 1 05:41:41 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep  1 06:38:11 2010 +0300| [958cd0365898ef0db3f1e8a42ef13a9f46e31e3e] | committer: Rémi Denis-Courmont 

subsdec: NULL dereference (fix #4125)

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

 modules/codec/subtitles/subsdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/subtitles/subsdec.c b/modules/codec/subtitles/subsdec.c
index b128859..7545cbb 100644
--- a/modules/codec/subtitles/subsdec.c
+++ b/modules/codec/subtitles/subsdec.c
@@ -284,7 +284,7 @@ static int OpenDecoder( vlc_object_t *p_this )
         psz_charset = var_InheritString (p_dec, "subsdec-encoding");
         msg_Dbg (p_dec, "trying configured character encoding: %s",
                  psz_charset ? psz_charset : "not specified");
-        if (!strcmp (psz_charset, "system"))
+        if (psz_charset != NULL && !strcmp (psz_charset, "system"))
         {
             free (psz_charset);
             psz_charset = strdup ("");



More information about the vlc-commits mailing list