mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/fflcms2: Don't access inexistent array elements
This would happen if one of the extended transfer characteristics is in use (currently only AVCOL_TRC_V_LOG). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
e85947576c
commit
0941646182
1 changed files with 1 additions and 4 deletions
|
|
@ -50,10 +50,7 @@ void ff_icc_context_uninit(FFIccContext *s)
|
||||||
static int get_curve(FFIccContext *s, enum AVColorTransferCharacteristic trc,
|
static int get_curve(FFIccContext *s, enum AVColorTransferCharacteristic trc,
|
||||||
cmsToneCurve **out_curve)
|
cmsToneCurve **out_curve)
|
||||||
{
|
{
|
||||||
if ((trc >= AVCOL_TRC_NB && trc < AVCOL_TRC_EXT_BASE) || trc >= AVCOL_TRC_EXT_NB)
|
if ((unsigned)trc < AVCOL_TRC_NB && s->curves[trc])
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
|
|
||||||
if (s->curves[trc])
|
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
switch (trc) {
|
switch (trc) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue