0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 19:42:24 +02:00

lcms: check for null arg in gl_parse_3dlut_size

This fixes `icc-3dlut-size` validation in config which would crash if
set without argument.

Found by OSS-Fuzz.
This commit is contained in:
Kacper Michajłow 2024-05-09 21:00:34 +02:00
parent 4fe67933c2
commit e175b3f685

View File

@ -44,6 +44,8 @@ bool gl_lcms_has_changed(struct gl_lcms *p, enum pl_color_primaries prim,
static inline bool gl_parse_3dlut_size(const char *arg, int *p1, int *p2, int *p3)
{
if (!arg)
return false;
if (!strcmp(arg, "auto")) {
*p1 = *p2 = *p3 = 0;
return true;