[FFmpeg-cvslog] avformat/sapdec: Check ffurl_get_file_handle() for error

Michael Niedermayer git at videolan.org
Sun Jan 5 01:28:57 EET 2025


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul 11 20:44:45 2024 +0200| [358be1d9cb50b944d25e72a2ad78877a11e74c4d] | committer: Michael Niedermayer

avformat/sapdec: Check ffurl_get_file_handle() for error

Fixes: CID1604506 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 3e305a0e703843765d4dd7042092c3a38c0f97af)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=358be1d9cb50b944d25e72a2ad78877a11e74c4d
---

 libavformat/sapdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c
index 2dd8524bce..c7be49ee5d 100644
--- a/libavformat/sapdec.c
+++ b/libavformat/sapdec.c
@@ -194,6 +194,9 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
     struct pollfd p = {fd, POLLIN, 0};
     uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
 
+    if (fd < 0)
+        return fd;
+
     if (sap->eof)
         return AVERROR_EOF;
 



More information about the ffmpeg-cvslog mailing list