Bug 4027

Summary: wrong list of argument for program execution in hush under some circumstances
Product: Busybox Reporter: richard.genoud
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.18.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:

Description richard.genoud 2011-07-29 09:20:47 UTC
here's a test.c:
#include <stdio.h>
int main(int argc, char **argv)
{
	while(--argc) {
		printf("arg%d=|%s|\n", argc, argv[argc]);
	}
	return 0;
}

old behaviour:
BusyBox v1.15.3 (2011-07-12 09:44:37 CEST) hush - the humble shell
/tmp # foo=" a "
/tmp # bar=" b "
/tmp # ./test.ppc $foo $bar
arg2=|b|
arg1=|a|
/tmp # 

new behaviour:
BusyBox v1.18.5 (2011-07-27 10:16:21 CEST) hush - the humble shell
/tmp # foo=" a "
/tmp # bar=" b "
/tmp # ./test $foo $bar
arg4=|b|
arg3=||
arg2=|a|
arg1=||
/tmp #
Comment 1 Denys Vlasenko 2011-08-01 16:19:01 UTC
Fixed in git by:

commit 6e42b89b8d136316e1b97b56cf885e8ef9d64caf
commit 4fb53fb08ce3da8eac13438ce613df20e523c75d

Will be in 1.19.x