diff options
author | James Almer <jamrial@gmail.com> | 2018-07-23 13:15:06 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-08-02 12:41:53 -0300 |
commit | 1e126560c2792e2e141167fb138d6ad1bfed7b39 (patch) | |
tree | 6aac7636a164af1ab076d16f98c8e87f7efe0a2b /libavformat/av1.c | |
parent | 4e937b1a60e239335df7623af5eeaa8dd534ee0b (diff) | |
download | ffmpeg-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.c | 3 |
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); |