mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
shorten: validate that the channel count in the header is not <= 0
This commit is contained in:
parent
4e13e50432
commit
4c53f4aed3
@ -342,7 +342,7 @@ static int read_header(ShortenContext *s)
|
||||
s->internal_ftype = get_uint(s, TYPESIZE);
|
||||
|
||||
s->channels = get_uint(s, CHANSIZE);
|
||||
if (s->channels > MAX_CHANNELS) {
|
||||
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user