commit c58eb2ceb965785dbe9fecb688e10250d17aeca7
Author:     Laslo Hunhold <d...@frign.de>
AuthorDate: Mon Aug 29 10:30:00 2022 +0200
Commit:     Laslo Hunhold <d...@frign.de>
CommitDate: Mon Aug 29 10:30:00 2022 +0200

    Quote input variables
    
    The passed values can be expected to never contain spaces, but it's
    better to be safe. Just theoretically, nobody is prevented from using
    a sh-binary located in "/opt/my favourite bins/sh".
    
    Signed-off-by: Laslo Hunhold <d...@frign.de>

diff --git a/Makefile b/Makefile
index bd1ca96..ac0e5f1 100644
--- a/Makefile
+++ b/Makefile
@@ -243,10 +243,10 @@ libgrapheme.so: $(SRC:=.o)
        $(CC) -o $@ $(SOFLAGS) $(LDFLAGS) $(SRC:=.o)
 
 $(MAN3:=.3):
-       SH=$(SH) MAN_DATE=$(MAN_DATE) UNICODE_VERSION=$(UNICODE_VERSION) $(SH) 
$(@:.3=.sh) > $@
+       SH="$(SH)" MAN_DATE="$(MAN_DATE)" UNICODE_VERSION="$(UNICODE_VERSION)" 
$(SH) $(@:.3=.sh) > $@
 
 $(MAN7:=.7):
-       SH=$(SH) MAN_DATE=$(MAN_DATE) UNICODE_VERSION=$(UNICODE_VERSION) $(SH) 
$(@:.7=.sh) > $@
+       SH="$(SH)" MAN_DATE="$(MAN_DATE)" UNICODE_VERSION="$(UNICODE_VERSION)" 
$(SH) $(@:.7=.sh) > $@
 
 benchmark: $(BENCHMARK)
        for m in $(BENCHMARK); do ./$$m; done

Reply via email to