mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avutil/csp: don't dereference NULL pointer in av_csp_primaries_desc_from_id()
Fixes CID 1668265. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -100,7 +100,7 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
|
||||
else if (((unsigned)prm >= AVCOL_PRI_EXT_BASE) &&
|
||||
((unsigned)prm < AVCOL_PRI_EXT_NB))
|
||||
p = &color_primaries_ext[prm - AVCOL_PRI_EXT_BASE];
|
||||
if (!p->prim.r.x.num)
|
||||
if (!p || !p->prim.r.x.num)
|
||||
return NULL;
|
||||
return p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user