summaryrefslogtreecommitdiff
path: root/libavformat/dv.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-14 22:34:28 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-14 22:34:28 +0000
commitd509c743b78da198af385fea362b632292cd00ad (patch)
tree2d60542133f640febd6111a0048c79b6d923095c /libavformat/dv.c
parent90b4f091770b38b803ce63a9dba2c03b643e732d (diff)
check if frame size matches old sys and assumes corrupted input, fixes #1192
Originally committed as revision 19192 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/dv.c')
-rw-r--r--libavformat/dv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 820c3b5cec..28d44ee54f 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -322,7 +322,7 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
- !(c->sys = dv_frame_profile(buf)) ||
+ !(c->sys = dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_size) {
return -1; /* Broken frame, or not enough data */
}
@@ -421,7 +421,7 @@ static int dv_read_header(AVFormatContext *s,
url_fseek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
return AVERROR(EIO);
- c->dv_demux->sys = dv_frame_profile(c->buf);
+ c->dv_demux->sys = dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES);
if (!c->dv_demux->sys) {
av_log(s, AV_LOG_ERROR, "Can't determine profile of DV input stream.\n");
return -1;