From patchwork Sun May 5 19:13:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 12998 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 8635C449048 for ; Sun, 5 May 2019 22:13:30 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F1AC68AD1A; Sun, 5 May 2019 22:13:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D53968ABB4 for ; Sun, 5 May 2019 22:13:23 +0300 (EEST) Received: by mail-io1-f48.google.com with SMTP id d19so9374444ioc.3 for ; Sun, 05 May 2019 12:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3ba8HFeB9KoKu6h3VYIMifG7oYNWp9+33OGk3Td/gx0=; b=CPSkkuN5EUBr2g4oIOOmHuxqJ04+OZ1/EN3EvNoPs27l8ihRCvQTnO1Vypn1yl9bI2 xg17JW62ODjLRpoBfHhzmspRbT10H4AJAu3UR9qPSpb4B5w23J+yv0Kx445Ergg228qE sxbR+NyJH9elC4xS828tdLoq04qsbDabbEBkZA2JKbnc4gCiA7QUkc69UpMWGCDFbOuz 6XNGHD+q4zWeV1q3k3urQrS6Lc487c4XGu/bDkG9I9VTxXTgttQ3akbxDaWsmWTzQGB8 XrFA+nLuADby++yVOzzvcSTuwliAC7heSxUjsV074QSfnGlR7UuRhSJQqMpU0CrO6pSJ 5q8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3ba8HFeB9KoKu6h3VYIMifG7oYNWp9+33OGk3Td/gx0=; b=b4stdN/8cvxoBULE3RKdAXa8V7jQ3cobrSiDbmksFMPCPMLScDevBlJQCa9k9QBbGM vHIdShTF2277rujdtLYGRHmgaZDRPO4g+DSrf5TAfsM6JojXZIM2au/7BJUb2ZbRw8jv xIKYigwXhK2BanQgtTonQQWMZC3seDh5G1KVgkobTyT+JoXLlN3JbAYCgtWlJhskSQD3 NpPvEg+QAMdrjsm14+K9BCXmImvgIlwEYQZSCiTtFKsf33CJ30RLZEq5wZB+A3Wxcjdk iVS44yk3ukjyBhoJMKJtO3auCNffw5K34eEwynC64q2C8TG2WTSSAGux8K3LgYD1rjwg bw3w== X-Gm-Message-State: APjAAAVmm8oiU66JUfc3/xCU0jKx2/XgSDPj3sZGf202i2ajb9RApGi4 pzgw6dZ8ZHrZaqQDW9GJFrpOWU+s/YszXzQwuXsDew== X-Google-Smtp-Source: APXvYqzL1nYFwTCyuQwL3JPPl08GmRzppZwZ+5b2lLR8VqVLRUDjzcwKcDZ9ehDF0Y2YZRG0FN5OpuF153eMHLNC6bs= X-Received: by 2002:a5d:9e09:: with SMTP id h9mr8258582ioh.250.1557083602065; Sun, 05 May 2019 12:13:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Carl Eugen Hoyos Date: Sun, 5 May 2019 21:13:10 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH]lavf/utils: Do not read "@" without ":" as user name separator X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Am So., 5. Mai 2019 um 21:08 Uhr schrieb Carl Eugen Hoyos : > > Hi! > > Attached patch fixes ticket #7871 without re-introducing #7816. And with the attachment. Carl Eugen From 969e30264d4f64885a943d347a5fa397efc0cd17 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 5 May 2019 21:05:40 +0200 Subject: [PATCH] lavf/utils: Do not read "@" without ":" as user name separator. Fixes ticket #7871. --- libavformat/utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index a63d71b0f4..c8d7f82a55 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4730,7 +4730,7 @@ void av_url_split(char *proto, int proto_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url) { - const char *p, *ls, *ls2, *ls3, *at, *at2, *col, *brk; + const char *p, *ls, *ls2, *ls3, *ls4, *at, *at2, *col, *brk; if (port_ptr) *port_ptr = -1; @@ -4761,7 +4761,8 @@ void av_url_split(char *proto, int proto_size, ls = strchr(p, '/'); ls2 = strchr(p, '?'); ls3 = strchr(p, '@'); - if (ls3 && ls3 > ls && (!ls2 || ls2 > ls3)) + ls4 = strchr(p, ':'); + if (ls3 && ls3 > ls && (!ls2 || ls2 > ls3) && ls4 && ls4 < ls3) ls = strchr(ls3, '/'); if (!ls) ls = ls2; -- 2.21.0