From 4cda859eb8001342be30e46fdf2d9df7e39a5ee2 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 23 Mar 2025 17:09:03 +0200 Subject: [PATCH] mu-sexp: tighten definition of plistp In a plist, we also require the first of each two element pairs to start with ':' Fixes #2830. --- lib/utils/mu-sexp.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils/mu-sexp.cc b/lib/utils/mu-sexp.cc index 8434f986..6a173b7c 100644 --- a/lib/utils/mu-sexp.cc +++ b/lib/utils/mu-sexp.cc @@ -326,7 +326,9 @@ Sexp::plistp(Sexp::const_iterator b, Sexp::const_iterator e) const else if (b + 1 == e) return false; else - return b->symbolp() && plistp(b + 2, e); + return b->symbolp() && + b->symbol().name.starts_with(':') + && plistp(b + 2, e); }