[vlc-devel] [PATCH 1/2] mosaic_bridge: fix format-overflow warning

Rémi Denis-Courmont remi at remlab.net
Thu Sep 5 16:34:58 CEST 2019


Hi,

While passing NULL for %s is unequivocally UB, I don't see how this patch fixes any format overflow, TBH.



Le 5 septembre 2019 14:37:24 GMT+03:00, Alexandre Janniaux <ajanni at videolabs.io> a écrit :
>---
> modules/stream_out/mosaic_bridge.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/modules/stream_out/mosaic_bridge.c
>b/modules/stream_out/mosaic_bridge.c
>index fa5d00c259..71c33090ef 100644
>--- a/modules/stream_out/mosaic_bridge.c
>+++ b/modules/stream_out/mosaic_bridge.c
>@@ -386,7 +386,7 @@ static void *Add( sout_stream_t *p_stream, const
>es_format_t *p_fmt )
>     };
>
>   psz_chain = var_GetNonEmptyString( p_stream, CFG_PREFIX "vfilter" );
>-    msg_Dbg( p_stream, "psz_chain: %s", psz_chain );
>+    msg_Dbg( p_stream, "psz_chain: '%s'", psz_chain ? psz_chain : "");
>     if( psz_chain )
>     {
>         filter_owner_t owner = {
>@@ -581,7 +581,8 @@ inline static int video_update_format_decoder(
>decoder_t *p_dec )
>     {
>         // update the filter after the format changed/is known
>char *psz_chain = var_GetNonEmptyString( p_owner->p_stream, CFG_PREFIX
>"vfilter" );
>-        msg_Dbg( p_owner->p_stream, "update filter: %s", psz_chain );
>+        msg_Dbg( p_owner->p_stream, "update filter: '%s'",
>+                 psz_chain ?  psz_chain : "" );
>         if( psz_chain )
>         {
>             es_format_t fmt;
>--
>2.23.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190905/bbc429b0/attachment.html>


More information about the vlc-devel mailing list