History

avformat/avienc: Check video dimensions

Michael Niedermayer committed 4 years ago

Commit ba0c3d11 parent b4431391 file · +4 −0Browse files

Unified · Split

libavformat/avienc.c+4−0
@@ -426,6 +426,10 @@ static int avi_write_header(AVFormatContext *s) · 425 unmodified lines
426 avio_wl32(pb, -1); /* quality */426 avio_wl32(pb, -1); /* quality */
427 avio_wl32(pb, au_ssize); /* sample size */427 avio_wl32(pb, au_ssize); /* sample size */
428 avio_wl32(pb, 0);428 avio_wl32(pb, 0);
429 if (par->width > 65535 || par->height > 65535) {
430 av_log(s, AV_LOG_ERROR, "%dx%d dimensions are too big\n", par->width, par->height);
431 return AVERROR(EINVAL);
432 }
429 avio_wl16(pb, par->width);433 avio_wl16(pb, par->width);
430 avio_wl16(pb, par->height);434 avio_wl16(pb, par->height);
431 ff_end_tag(pb, strh);435 ff_end_tag(pb, strh);

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