This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit f87923765d84301f9d1c32f201fb1b09aabf4a3d
Author:     Niklas Haas <[email protected]>
AuthorDate: Wed Jun 10 14:23:06 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Sun Jun 14 11:10:12 2026 +0200

    avformat/shared: robustness fix for seek-past-end
    
    If the filesize is known as a result of AVERROR_EOF on a block that ends
    before the current seek position, this might end up negative. Error
    out cleanly instead of aborting.
    
    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <[email protected]>
---
 libavformat/shared.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/shared.c b/libavformat/shared.c
index e5f495aa99..95c60b14eb 100644
--- a/libavformat/shared.c
+++ b/libavformat/shared.c
@@ -790,7 +790,8 @@ retry:
     }
 
     size = FFMIN(bytes_read - offset, size);
-    av_assert0(size > 0);
+    if (size <= 0)
+        return AVERROR_EOF;
     if (tmp != buf)
         memcpy(buf, &tmp[offset], size);
     s->pos += size;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to