OSDN Git Service

rsd: limit number of channels
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 19 Oct 2016 21:40:41 +0000 (23:40 +0200)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 20 Oct 2016 17:54:54 +0000 (19:54 +0200)
commitee5f0f1d355fa0fd9194ac97a2c8598c93ed328b
tree1adf7552dd9b5ec8f9d6d869e66b721242b82d5c
parent8bd38ec5bde1d2691d6385975a2bad61538188bf
rsd: limit number of channels

Negative values don't make sense and too large values can cause
overflows. For AV_CODEC_ID_ADPCM_THP this leads to a too small extradata
buffer being allocated, causing out-of-bounds writes.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/rsd.c