From 8f5b21964ece066d15794cf9d17be5b3906fe596 Mon Sep 17 00:00:00 2001
From: Ondrej Zajicek <santiago@crfreenet.org>
Date: Tue, 6 May 2025 14:50:53 +0200
Subject: [PATCH] Conf: Fix invalid check in text_or_ipa grammar

Can cause crash when a bad expression is used.
---
 conf/confbase.Y | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/confbase.Y b/conf/confbase.Y
index af64e3ff9..857689707 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -426,8 +426,8 @@ text_or_ipa:
    }
  | '(' term ')' {
      $$ = cf_eval($2, T_VOID);
-     if (($$.type != T_BYTESTRING) && ($$.type != T_STRING))
-       cf_error("Bytestring or string value expected");
+     if (($$.type != T_STRING) && ($$.type != T_IP))
+       cf_error("String or IP value expected");
    }
  ;
 
-- 
GitLab

