History

Merge commit 'f7986239f4dbec91c743c4c5eb0a2339bd325bf6'

* commit 'f7986239f4dbec91c743c4c5eb0a2339bd325bf6': dvenc: Validate the frame size before copying it

Hendrik Leppkes committed 10 years ago

Commit 255f8962 parents b98305f f7986231 file · +5 −0Browse files

Unified · Split

libavformat/dvenc.c+5−0
@@ -250,6 +250,11 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st, · 249 unmodified lines
250250 /* FIXME: we have to have more sensible approach than this one */
251251 if (c->has_video)
252252 av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames);
253+ if (data_size != c->sys->frame_size) {
254+ av_log(st->codec, AV_LOG_ERROR, "Unexpected frame size, %d != %d\n",
255+ data_size, c->sys->frame_size);
256+ return AVERROR(ENOSYS);
257+ }
253258
254259 memcpy(*frame, data, c->sys->frame_size);
255260 c->has_video = 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t