From 7bf150c11a6d3b8145b7a3d8b7d0ae2349e0c094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 17 Dec 2022 10:25:16 +0100 Subject: [PATCH] =?UTF-8?q?config:=20value=5Fto=5Fpt=5For=5Fpx():=20don?= =?UTF-8?q?=E2=80=99t=20allow=20empty=20px=20values=20(key=3Dpx)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index b10f42b2..af93f419 100644 --- a/config.c +++ b/config.c @@ -651,7 +651,7 @@ value_to_pt_or_px(struct context *ctx, struct pt_or_px *res) char *end = NULL; long value = strtol(s, &end, 10); - if (!(errno == 0 && end == s + len - 2)) { + if (!(len > 2 && errno == 0 && end == s + len - 2)) { LOG_CONTEXTUAL_ERR("invalid px value (must be in the form 12px)"); return false; }