[FFmpeg-cvslog] avformat/av1: return an error when no data is provided to ff_isom_write_av1c()
James Almer
git at videolan.org
Thu Aug 2 21:02:46 EEST 2018
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Jul 23 13:15:06 2018 -0300| [1e126560c2792e2e141167fb138d6ad1bfed7b39] | committer: James Almer
avformat/av1: return an error when no data is provided to ff_isom_write_av1c()
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e126560c2792e2e141167fb138d6ad1bfed7b39
---
libavformat/av1.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/av1.c b/libavformat/av1.c
index 7db29c8d76..7c55a100bf 100644
--- a/libavformat/av1.c
+++ b/libavformat/av1.c
@@ -82,6 +82,9 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size)
int64_t obu_size;
int start_pos, type, temporal_id, spatial_id;
+ if (size <= 0)
+ return AVERROR_INVALIDDATA;
+
while (size > 0) {
int ret = parse_obu_header(buf, size, &obu_size, &start_pos,
&type, &temporal_id, &spatial_id);
More information about the ffmpeg-cvslog
mailing list