[vlc-devel] [PATCH] mpeg: fix format-overflow warning

Alexandre Janniaux ajanni at videolabs.io
Sat Oct 19 15:11:08 CEST 2019


psz_key can be NULL, which triggers a format-overflow warning.
---
 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 */
--
2.23.0



More information about the vlc-devel mailing list