From patchwork Fri Aug 16 08:38:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsWCYcW8ZWogU3pjenlnaWXFgg==?= X-Patchwork-Id: 14550 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 83AE144A46C for ; Fri, 16 Aug 2019 11:39:47 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BCF468AD76; Fri, 16 Aug 2019 11:39:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mx3.wp.pl (mx3.wp.pl [212.77.101.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3F1A868AD50 for ; Fri, 16 Aug 2019 11:39:41 +0300 (EEST) Received: (wp-smtpd smtp.wp.pl 26762 invoked from network); 16 Aug 2019 10:39:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1565944779; bh=iwbYUwcPCMuat+LnXJ0g9lMKvWzHgEBcuPhBrkL4vFI=; h=From:To:Cc:Subject; b=PECb0Hb39spkUu2+Uqucwsi1kAXsXsun1KySiYJdCKlHeyqgpjj/Q/FVlT4QhNho2 LiZCsbfbuGwHP1kjtoEfPFGW1ZRHd9II7wz43hUYdCJ92DH1NkxLL8Zn3jlc6dh4RJ VKoXhb6LMzJjt8t0mS4VwGyazjNEz3PgNtFmYb9Q= Received: from 185-230-168-169.ip.infoo.net (HELO localhost.localdomain) (spaz16@wp.pl@[185.230.168.169]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Aug 2019 10:39:39 +0200 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 16 Aug 2019 10:38:46 +0200 Message-Id: <20190816083845.2269-1-spaz16@wp.pl> X-Mailer: git-send-email 2.22.1 MIME-Version: 1.0 X-WP-DKIM-Status: good (id: wp.pl) X-WP-MailID: d20adcefd54cb911dc1891cbac91cad7 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000001 [QVJR] Subject: [FFmpeg-devel] [PATCH] lavf/tls_gnutls: check for interrupt inside handshake loop 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 Cc: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" fixes #8080 Signed-off-by: Błażej Szczygieł --- libavformat/tls_gnutls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c index f32bc2821b..f507b7d044 100644 --- a/libavformat/tls_gnutls.c +++ b/libavformat/tls_gnutls.c @@ -184,6 +184,10 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op gnutls_priority_set_direct(p->session, "NORMAL", NULL); do { ret = gnutls_handshake(p->session); + if (ff_check_interrupt(&h->interrupt_callback)) { + ret = AVERROR_EXIT; + goto fail; + } if (gnutls_error_is_fatal(ret)) { ret = print_tls_error(h, ret); goto fail;