From e175b3f6853bf3674205990f755467fc5817f713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Thu, 9 May 2024 21:00:34 +0200 Subject: [PATCH] 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. --- video/out/gpu/lcms.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/gpu/lcms.h b/video/out/gpu/lcms.h index d0b0fe5b89..30a6c54e83 100644 --- a/video/out/gpu/lcms.h +++ b/video/out/gpu/lcms.h @@ -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;