[vlc-commits] mpeg: fix format-overflow warning

Alexandre Janniaux git at videolan.org
Mon Oct 21 09:25:18 CEST 2019


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Sat Oct 19 15:11:08 2019 +0200| [56452f2173d31dd970448c6dc2ed9904ad8b3a39] | committer: Steve Lhomme

mpeg: fix format-overflow warning

psz_key can be NULL, which triggers a format-overflow warning.

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 modules/demux/mpeg/ts_si.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ts_si.c b/modules/demux/mpeg/ts_si.c
index 65465fd6ef..3aef96ce96 100644
--- a/modules/demux/mpeg/ts_si.c
+++ b/modules/demux/mpeg/ts_si.c
@@ -458,7 +458,8 @@ static void EITExtractDrDescItems( demux_t *p_demux, const dvbpsi_extended_event
                 continue;
             }
 
-            msg_Dbg( p_demux, "       - desc='%s' item='%s'", psz_key, psz_itm );
+            msg_Dbg( p_demux, "       - desc='%s' item='%s'",
+                     psz_key ? psz_key : "(null)", psz_itm );
             if( b_appending )
             {
                 /* Continued items */



More information about the vlc-commits mailing list