From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 99FEC4C94C for ; Thu, 18 Sep 2025 13:51:41 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'hufCFBxuY5RiNZu1CppUbznHYq2SfxDmoqJE6suRU/Y=', expected b'alF97NafXh0XkPMjjzjZwsgFA2d3lF1KfiDwI7xHKag=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1758203467; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=hufCFBxuY5RiNZu1CppUbznHYq2SfxDmoqJE6suRU/Y=; b=2Q7oyyJjLr/3OvmoKJ5xgHqtpINGMgOxvyvkW2szQUrW+1uMvGy0fKySIZ3rXqE9wtMv5 Qo0C7RDepWBdnMnagnrywzkq+brlVLDSw9yL67Ou02mPSNuWt5ubw0O0eRMFMA9wUCyAA31 utwPeQkSNwm/XYNtAYy7PJJQoyOlg33ggl5N4Hp3cov4FiJXt10mU8gJpD2eAEZ6ehXT2ge YL7ePeBUbsUUCk2WTdzx7ASQxGgOHisiOB53/Ox07utCLE/BFGv6YZYbr/PH3bnGl8+kon0 DHaKvApkaSL1oF06xzx5wt4vjLReKEDWfxHDu1wrFKEfLLJLWg29p7+HddPw== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id F249868EA5F; Thu, 18 Sep 2025 16:51:06 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1758203462; b=Foue4xQpDw6iZMahu9wp2MAEXpkX50Q4jbsAy/VPIJLSaW5MR55MuvZmJo6w/DB2RlINq 9646umyBzXG4Y5i57NRSBh4YFr5I13CvqrAeZ+tke4fyPW/cR8t9Qyy43l5vXAMUf8cuw0B 8WUW7k8z8U5PjPjLETf9VZiZfGbg2xi/ilHWnkG9In3rVcUjwCqnRMy/U8MbBKqDkNTPzBo i5v9aZKImtVCDBCDuMzQQHm+wpN6dT6DJEPegxaufku4c7MEGeXOe3j8ncpg6c5mfjjYoQz TsFnRDtaAIzeiVKv4js56fXfT3CJP5hJvNzfR+cyCmUgJO2iEYry0YxErK/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1758203462; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=El8ZwQUlJg/1seMt+tPbSg0ZmSJZYuQR8Kd+km4ItpI=; b=PWJdTVzdbD+7phZF8Kt2QbMJE0k9dA/fqevpx6mVebrcUwqs+t1Yv7E6ZfZf1SG4CBN+s 3bDXfUJxoQN+2eNhPJwFxKnFkjIAl7m1WITSlhzqoX5OO0dEYgFtGxIHoeDeSukEsTyvaXJ SUHHAV7BpU3gn4YTMOzxiRcFDKlvXyG7dq7P01CapZSZGiAmy1UvP0JVcSZcRej00DjGXzy +rcQC2RVAziOp0OlJDh46ahMokeFobjnA5kUIGrcEEy6TINnxVPuN1zEhbzwFG6UBHmAkLg spl8axQY4mHcPwEfMbSgaRMtAj70ju6vlb4yTPnksS+CJ9FOH+2+n+AC0L4g== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1758203451; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=alF97NafXh0XkPMjjzjZwsgFA2d3lF1KfiDwI7xHKag=; b=MavOYPai810j5zOF5cd3sMBJYKTXghttzdAJ2GesC+8O5coX19m4Tg/E/Gg5CfVqPyjfV uW9Wnlrah3pHhVuLgwjc6OYmkScnC+ez4p7Tf+4rk4xzp/LxEa/ZOH86ksrhpRJo3QRCC/Y QHM7EUJkQJILpg5pL11/P5Q04rVbAcgcgp+T1tRpiHRQJdq8DY+1Nyt9rmd9vJJDgOHfjqI 9ZYuAaP62ukbiRVCin7UCyk4qiUM4lQaArpe2ovTK2xAiY65fknYKCwZ6aHARWvvIELYKie vI8vtIGAcQn3o3Q30PdEDOSVtMjF2jIUMxFRETt1Y9kAmdvZULRpVddgsAhg== Received: from ed19c606a818 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 4154568EA51 for ; Thu, 18 Sep 2025 16:50:51 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Sep 2025 13:50:50 -0000 Message-ID: <175820345145.25.2061279955581888793@463a07221176> Message-ID-Hash: 6J557NBETYUBIGQSUHAXSUCGFP7VMQTT X-Message-ID-Hash: 6J557NBETYUBIGQSUHAXSUCGFP7VMQTT X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] Revert "avformat/tls_openssl: add av_assert0() for tls_shared" (PR #20548) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: mkver via ffmpeg-devel Cc: mkver Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20548 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20548 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20548.patch This reverts commits fd55c4b5f72a157fbb128d0ef203e9922b53552b (for tls_openssl.c) and c74181a04b5f4e650eae662231e56518daef64d4 (for tls_gnutls.c). It is impossible for a pointer to a member of a structure to be NULL: If the containing structure exists, the member exists and can't have a NULL address; if the containing structure does not exist, then getting a pointer to the substructure via &c->tls_shared would already be undefined behavior (and if c were NULL, then the (UB) pointer arithmetic performed under the hood to access the member would most likely yield a pointer pointing to the address offsetof(TLSContext,tls_shared) which would pass the asserts). Signed-off-by: Andreas Rheinhardt >>From fa8309d3de658e8a51ee208edb5ecefe29ad561f Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 18 Sep 2025 14:58:55 +0200 Subject: [PATCH] Revert "avformat/tls_openssl: add av_assert0() for tls_shared" This reverts commits fd55c4b5f72a157fbb128d0ef203e9922b53552b (for tls_openssl.c) and c74181a04b5f4e650eae662231e56518daef64d4 (for tls_gnutls.c). It is impossible for a pointer to a member of a structure to be NULL: If the containing structure exists, the member exists and can't have a NULL address; if the containing structure does not exist, then getting a pointer to the substructure via &c->tls_shared would already be undefined behavior (and if c were NULL, then the (UB) pointer arithmetic performed under the hood to access the member would most likely yield a pointer pointing to the address offsetof(TLSContext,tls_shared) which would pass the asserts). Signed-off-by: Andreas Rheinhardt --- libavformat/tls_gnutls.c | 3 --- libavformat/tls_openssl.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c index 53306872a0..272603f1dd 100644 --- a/libavformat/tls_gnutls.c +++ b/libavformat/tls_gnutls.c @@ -30,7 +30,6 @@ #include "os_support.h" #include "url.h" #include "tls.h" -#include "libavutil/avassert.h" #include "libavutil/opt.h" #include "libavutil/thread.h" @@ -157,7 +156,6 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op TLSShared *s = &c->tls_shared; uint16_t gnutls_flags = 0; int ret; - av_assert0(s); ff_gnutls_init(); @@ -263,7 +261,6 @@ static int dtls_open(URLContext *h, const char *uri, int flags, AVDictionary **o { TLSContext *c = h->priv_data; TLSShared *s = &c->tls_shared; - av_assert0(s); s->is_dtls = 1; return tls_open(h, uri, flags, options); } diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index db7147e491..7068497325 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/avassert.h" #include "libavutil/mem.h" #include "network.h" #include "os_support.h" @@ -747,7 +746,6 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary ** TLSContext *c = h->priv_data; TLSShared *s = &c->tls_shared; int ret = 0; - av_assert0(s); s->is_dtls = 1; c->ctx = SSL_CTX_new(s->listen ? DTLS_server_method() : DTLS_client_method()); @@ -848,7 +846,6 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op TLSShared *s = &c->tls_shared; int ret; - av_assert0(s); if ((ret = ff_tls_open_underlying(s, h, uri, options)) < 0) goto fail; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org