summaryrefslogtreecommitdiff
path: root/libavformat/tls_gnutls.c
diff options
context:
space:
mode:
authorBłażej Szczygieł <spaz16@wp.pl>2019-08-16 10:38:46 +0200
committerJan Ekström <jeebjp@gmail.com>2020-09-04 22:06:02 +0300
commit3dd24b0f708ae5c68607de0828480b09c8f95004 (patch)
tree07592c4951f343709f601fefd0566575c7156734 /libavformat/tls_gnutls.c
parent082dfc8bd55237562f8335cecf04a2c932f40eea (diff)
downloadffmpeg-3dd24b0f708ae5c68607de0828480b09c8f95004.tar.gz
lavf/tls_gnutls: check for interrupt inside handshake loop
fixes #8080 Signed-off-by: Błażej Szczygieł <spaz16@wp.pl> (cherry picked from commit 561ba15c973120c9565a8f75a7439f3e8a10e04d)
Diffstat (limited to 'libavformat/tls_gnutls.c')
-rw-r--r--libavformat/tls_gnutls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index f32bc2821b..e41156cc30 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -183,6 +183,11 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
gnutls_transport_set_ptr(p->session, c->tcp);
gnutls_priority_set_direct(p->session, "NORMAL", NULL);
do {
+ if (ff_check_interrupt(&h->interrupt_callback)) {
+ ret = AVERROR_EXIT;
+ goto fail;
+ }
+
ret = gnutls_handshake(p->session);
if (gnutls_error_is_fatal(ret)) {
ret = print_tls_error(h, ret);