Message ID | 20200127082821.22770-2-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat/mov: Free encryption data on error | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
On Mon, Jan 27, 2020 at 09:28:19AM +0100, Andreas Rheinhardt wrote: > Fixes Coverity issue #1441933. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavformat/mov.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) will apply thx [...]
diff --git a/libavformat/mov.c b/libavformat/mov.c index 7b7d4f43fa..50b8ccb02f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1327,8 +1327,10 @@ static int update_frag_index(MOVContext *c, int64_t offset) for (i = 0; i < c->fc->nb_streams; i++) { // Avoid building frag index if streams lack track id. - if (c->fc->streams[i]->id < 0) + if (c->fc->streams[i]->id < 0) { + av_free(frag_stream_info); return AVERROR_INVALIDDATA; + } frag_stream_info[i].id = c->fc->streams[i]->id; frag_stream_info[i].sidx_pts = AV_NOPTS_VALUE;
Fixes Coverity issue #1441933. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/mov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)