[vlc-devel] [PATCH] ccda: fix compiler warning

George Vdl george.vdl1 at gmail.com
Mon Apr 12 17:13:54 UTC 2021


Yes, I forgot to patch this part, will send a patch soon.

On Mon, Apr 12, 2021, 20:00 Tristan Matthews <tmatth at videolan.org> wrote:

> On Mon, Apr 12, 2021 at 12:51 PM George Vaindirlis
> <george.vdl1 at gmail.com> wrote:
> >
> > fix warning: ā€˜%uā€™ directive output may be truncated writing between 1
> and 10 bytes into a region of size 5 [-Wformat-truncation=]
> > (Please reject the previous patch from me with the same description, it
> has a typo in the code)
> >
> > ---
> >  modules/access/cdda.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/access/cdda.c b/modules/access/cdda.c
> > index 9260b833ed..42ec944d12 100644
> > --- a/modules/access/cdda.c
> > +++ b/modules/access/cdda.c
> > @@ -635,7 +635,7 @@ static void AccessGetMeta(stream_t *access,
> vlc_meta_t *meta)
> >              vlc_meta_SetGenre(meta, str);
> >
> >          const unsigned year = cddb_disc_get_year(sys->cddb);
> > -        if (year != 0)
> > +        if (year != 0 && year < 10000)
> >          {
> >              char yearbuf[5];
> >
> > --
> > 2.30.2
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
>
> Should the same check be done here?
>
> https://code.videolan.org/videolan/vlc/-/blob/master/modules/access/cdda.c#L829
>
> Best,
> Tristan
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20210412/affd2400/attachment-0001.html>


More information about the vlc-devel mailing list