[ffmpeg] branch master updated. db6cd6c6bf avformat/tls_openssl: Don't call functions inside FFMIN
The branch, master has been updated via db6cd6c6bfe6f306dd8d9de2a0086586cbd27ec1 (commit) from ced4a6ebc9e7cd92d0ca9b9fb8f9d1013d23cbfa (commit) - Log ----------------------------------------------------------------- commit db6cd6c6bfe6f306dd8d9de2a0086586cbd27ec1 Author: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> AuthorDate: Mon Sep 22 15:34:30 2025 +0200 Commit: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> CommitDate: Mon Sep 22 21:58:00 2025 +0200 avformat/tls_openssl: Don't call functions inside FFMIN It may call the function multiple times. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index edfd657a3f..86b4d21799 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -939,8 +939,10 @@ static int tls_write(URLContext *h, const uint8_t *buf, int size) uc->flags &= ~AVIO_FLAG_NONBLOCK; uc->flags |= h->flags & AVIO_FLAG_NONBLOCK; - if (s->is_dtls) - size = FFMIN(size, DTLS_get_data_mtu(c->ssl)); + if (s->is_dtls) { + const size_t mtu_size = DTLS_get_data_mtu(c->ssl); + size = FFMIN(size, mtu_size); + } ret = SSL_write(c->ssl, buf, size); if (ret > 0) ----------------------------------------------------------------------- Summary of changes: libavformat/tls_openssl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive --
participants (1)
-
ffmpeg-git@ffmpeg.org