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

Git pushed a commit to branch master
in repository ffmpeg.

commit 6ba0b59d8b014a311f94657557769040d8305327
Author:     James Almer <[email protected]>
AuthorDate: Fri Mar 13 20:19:36 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sun Mar 15 19:27:07 2026 -0300

    avcodec/bytestream2: don't allow using NULL pointers
    
    This is UB.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/bytestream.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h
index 9c13a2791b..c5ce928647 100644
--- a/libavcodec/bytestream.h
+++ b/libavcodec/bytestream.h
@@ -138,7 +138,7 @@ static av_always_inline void 
bytestream2_init(GetByteContext *g,
                                               const uint8_t *buf,
                                               int buf_size)
 {
-    av_assert0(buf_size >= 0);
+    av_assert0(buf && buf_size >= 0);
     g->buffer       = buf;
     g->buffer_start = buf;
     g->buffer_end   = buf + buf_size;
@@ -148,7 +148,7 @@ static av_always_inline void 
bytestream2_init_writer(PutByteContext *p,
                                                      uint8_t *buf,
                                                      int buf_size)
 {
-    av_assert0(buf_size >= 0);
+    av_assert0(buf && buf_size >= 0);
     p->buffer       = buf;
     p->buffer_start = buf;
     p->buffer_end   = buf + buf_size;

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

Reply via email to