[vlc-commits] atsc_a65: fix forward null deref (cid #1352635)

Francois Cartegnie git at videolan.org
Wed Feb 17 16:20:02 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 15 11:20:08 2016 +0100| [21c71f5e6d7f556ff87c8ffe7a90ff4bda843a22] | committer: Francois Cartegnie

atsc_a65: fix forward null deref (cid #1352635)

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

 modules/codec/atsc_a65.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/atsc_a65.c b/modules/codec/atsc_a65.c
index 8356339..2f9491c 100644
--- a/modules/codec/atsc_a65.c
+++ b/modules/codec/atsc_a65.c
@@ -277,7 +277,8 @@ char * atsc_a65_Decode_simple_UTF16_string( atsc_a65_handle_t *p_handle, const u
         free( psz_converted );
         psz_converted = NULL;
     }
+    else
+        psz_converted[ i_target_buffer - i_target_remaining - 1 ] = 0;
 
-    psz_converted[ i_target_buffer - i_target_remaining - 1 ] = 0;
     return psz_converted;
 }



More information about the vlc-commits mailing list