Commit 255f8966 authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit 'f7986239'

* commit 'f7986239':
  dvenc: Validate the frame size before copying it
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents b98305f0 f7986239
......@@ -250,6 +250,11 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st,
/* FIXME: we have to have more sensible approach than this one */
if (c->has_video)
av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames);
if (data_size != c->sys->frame_size) {
av_log(st->codec, AV_LOG_ERROR, "Unexpected frame size, %d != %d\n",
data_size, c->sys->frame_size);
return AVERROR(ENOSYS);
}
memcpy(*frame, data, c->sys->frame_size);
c->has_video = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment