Bug 4027 - wrong list of argument for program execution in hush under some circumstances
Summary: wrong list of argument for program execution in hush under some circumstances
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.18.x
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 09:20 UTC by richard.genoud
Modified: 2011-08-01 16:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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