From e4a652525a4b57ddf66eea308940401be76e3180 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Thu, 31 Jul 2025 19:29:34 +0200 Subject: [PATCH] Makefile: fix list-defconfigs for br2-external with weird descriptions When a br2-external tree description contains an odd number of single quotes, list-defconfigs will fail with a shell error message: /bin/sh: -c: line 1: unexpected EOF while looking for matching `"' make[1]: *** [Makefile:1243: list-defconfigs] Error 2 Whoever wrote that code will have to write this sentence 100 times on the blackboard: Never, ever pass user-provided data in a printf format. (see commit 49117c102803 (core: support description for br2-external trees); dang, I knew it... And I should have known better when I wrote that code, damit...) Signed-off-by: Yann E. MORIN Signed-off-by: Julien Olivain (cherry picked from commit 161d7ded43da4d48641db5ea83b1af4cb976410a) Signed-off-by: Thomas Perale --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d275b113ac..476e850f8e 100644 --- a/Makefile +++ b/Makefile @@ -1223,7 +1223,7 @@ define list-defconfigs [ -f "$${defconfig}" ] || continue; \ if $${first}; then \ if [ "$(2)" ]; then \ - printf 'External configs in "$(call qstrip,$(2))":\n'; \ + printf 'External configs in "%s":\n' "$(call qstrip,$(2))"; \ else \ printf "Built-in configs:\n"; \ fi; \