[FFmpeg-devel] [PATCH] Allow use of @ character in username and passwords embedded in URLs

Michael Niedermayer michaelni at gmx.at
Fri Nov 16 13:56:00 CET 2012


On Thu, Nov 15, 2012 at 11:00:08AM +0000, Gavin Kinsey wrote:
> 
> -- 
> Gavin Kinsey
> AD Holdings Plc
> 
> 
> --------------------------------------------------------
> This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to whom they are addressed. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system; you may not copy this message or disclose its contents to anyone. The recipient should check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Company. Contact Customer Services for details customerservices at dmicros.com

>  utils.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 4a332f378c2b3ebfb479499b4cf253f099a273df  0001-Allow-use-of-character-in-username-and-passwords-emb.patch
> From bbecafc18e07fdbe109ffe6ded8b7fb7e1f9fade Mon Sep 17 00:00:00 2001
> From: Gavin Kinsey <gkinsey at ad-holdings.co.uk>
> Date: Thu, 15 Nov 2012 10:56:47 +0000
> Subject: [PATCH] Allow use of @ character in username and passwords embedded in URLs
> 
> ---
>  libavformat/utils.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 4072ac8..8a07f17 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -3620,7 +3620,7 @@ void av_url_split(char *proto, int proto_size,
>      /* the rest is hostname, use that to parse auth/port */
>      if (ls != p) {
>          /* authorization (user[:pass]@hostname) */
> -        if ((at = strchr(p, '@')) && at < ls) {
> +        if ((at = strrchr(p, '@')) && at < ls) {
>              av_strlcpy(authorization, p,

wont this break when @ is in the path ? or server name ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121116/e38b005b/attachment.asc>


More information about the ffmpeg-devel mailing list