[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen: fix unspecified behavior in tr invocation
commit 09a338ae72d2f9dd8e9372669a2ebb2f4652a905 Author: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> AuthorDate: Mon Jun 30 10:06:54 2025 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Jun 30 10:06:54 2025 +0200 xen: fix unspecified behavior in tr invocation The result of the command is undefined according to the specification if the "string2" argument in tr is shorter than "string1". GNU tr behaves correctly by extending "string2" to repeat the last character. Fixes: eb61a4fb14d2 ("xen: fix header guard generation for asm-generic headers") Reported-by: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/scripts/Makefile.asm-generic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/scripts/Makefile.asm-generic b/xen/scripts/Makefile.asm-generic index f6850758c5..4e628e116a 100644 --- a/xen/scripts/Makefile.asm-generic +++ b/xen/scripts/Makefile.asm-generic @@ -34,7 +34,7 @@ unwanted := $(filter-out $(generic-y) $(generated-y),$(old-headers)) quiet_cmd_wrap = WRAP $@ cmd_wrap = \ arch=$$(echo $@ | sed -n 's:.*arch/\([^/]*\)/.*:\1:p' | tr a-z A-Z); \ - upper=$$(echo $*.h | tr a-z A-Z | tr '/.-' '__'); \ + upper=$$(echo $*.h | tr a-z A-Z | tr '/.-' '___'); \ echo "\#ifndef $${arch}_GENERIC_$${upper}" > $@.new; \ echo "\#define $${arch}_GENERIC_$${upper}" >> $@.new; \ echo "\#include <asm-generic/$*.h>" >> $@.new; \ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |