[FFmpeg-devel] [PATCH] Avoids duplicated slashes in the RTSP URL. Signed-off-by: Frederic Pillonel <fpi at gmx.ch>
Michael Niedermayer
michael at niedermayer.cc
Tue Jan 22 22:49:45 EET 2019
On Tue, Jan 22, 2019 at 07:18:33PM +0000, fpi at gmx.ch wrote:
> From: Frederic Pillonel <fpi at gmx.ch>
>
> ---
> libavformat/rtsp.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> index ceb770a3a4..20f63e0e01 100644
> --- a/libavformat/rtsp.c
> +++ b/libavformat/rtsp.c
> @@ -548,9 +548,10 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
> NULL, NULL, 0, p);
> if (proto[0] == '\0') {
> /* relative control URL */
> - if (rtsp_st->control_url[strlen(rtsp_st->control_url)-1]!='/')
> - av_strlcat(rtsp_st->control_url, "/",
> - sizeof(rtsp_st->control_url));
> + if (rtsp_st->control_url[strlen(rtsp_st->control_url)-1]!='/' &&
> + (sizeof(p) > 0 && p[0]!='/'))
what is sizeof(p) > 0 supposed to check for ?
p is a pointer which cannot have a size of 0
also The commit message should start with a prefix specifying the area or
file changed
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190122/b8f615f2/attachment.sig>
More information about the ffmpeg-devel
mailing list