aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/av1.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-07-23 13:15:06 -0300
committerJames Almer <jamrial@gmail.com>2018-08-02 12:41:53 -0300
commit1e126560c2792e2e141167fb138d6ad1bfed7b39 (patch)
tree6aac7636a164af1ab076d16f98c8e87f7efe0a2b /libavformat/av1.c
parent4e937b1a60e239335df7623af5eeaa8dd534ee0b (diff)
downloadffmpeg-1e126560c2792e2e141167fb138d6ad1bfed7b39.tar.gz
avformat/av1: return an error when no data is provided to ff_isom_write_av1c()
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/av1.c')
-rw-r--r--libavformat/av1.c3
1 files changed, 3 insertions, 0 deletions
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);