aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-10-15 11:38:23 -0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-09 22:19:40 +0200
commit6fe33489be72eee8010c28165f4b12870df4c600 (patch)
tree0a50319759e11d32cb7cb408cf5dc3b02c02c537
parentd38c8064d448e9190db311dc525cfdc674051901 (diff)
downloadffmpeg-6fe33489be72eee8010c28165f4b12870df4c600.tar.gz
avformat/latmenc: abort if no extradata is available
Fixes ticket #8273. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit dd01947397b98e94c3f2a79d5820aaf4594f4d3b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/latmenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index 273197bb54..4fbbd037e4 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -172,7 +172,8 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0)
return ret;
memcpy(par->extradata, side_data, side_data_size);
- }
+ } else
+ return AVERROR_INVALIDDATA;
}
}