[vlc-devel] [PATCH 1/2] rtsp: ensure session ID is at least 8 bytes

Alexandre Janniaux ajanni at videolabs.io
Thu Sep 12 20:35:33 CEST 2019


Hi,

Thank you for your review.

Please check the following patch to see where it's used in RTP.

The associated RFC declares that it would need at least 8 bytes of data for a
session id. It doesn't look to be harmful in any way but if it's possible, it
seems to me that it would be a good idea to follow this.

I'm not very knowledgeable when it comes to RTP/RTSP though so if you find it
useless, maybe you can discard this patch and document why in the comment close
to the other patch, which is the primary goal of the patchset.

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, Sep 12, 2019 at 08:46:54PM +0300, Rémi Denis-Courmont wrote:
> Le torstaina 5. syyskuuta 2019, 20.43.44 EEST Alexandre Janniaux a écrit :
> > ---
> >  modules/stream_out/rtsp.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
> > index 6161f6a795..3053dff3c6 100644
> > --- a/modules/stream_out/rtsp.c
> > +++ b/modules/stream_out/rtsp.c
> > @@ -808,8 +808,9 @@ static int RtspHandler( rtsp_stream_t *rtsp,
> > rtsp_stream_id_t *id,
> >
> >                      if( psz_session == NULL )
> >                      {
> > -                        /* Create a dummy session ID */
> > -                        snprintf( psz_sesbuf, sizeof( psz_sesbuf ), "%lu",
> > +                        /* Create a dummy session ID. We use it for RTP so
> > make +                         * sure the length is at least 8 bytes. */
>
> I don't see what the session ID has to do with RTP.
>
> > +
> >                       snprintf( psz_sesbuf, sizeof( psz_sesbuf ), "%"
> > PRIu64, vlc_mrand48() );
> >                          psz_session = psz_sesbuf;
> >                      }
>
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list