Bug 853

Summary: HUSH: closes when given undefined variable as only argument
Product: Busybox Reporter: Mikel Garai <m.garai>
Component: OtherAssignee: unassigned
Status: RESOLVED WORKSFORME    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.15.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:
Attachments: quick fix for this bug

Description Mikel Garai 2010-01-11 16:50:21 UTC
Created attachment 895 [details]
quick fix for this bug

When you write a variable that is not previously defined (or is empty) in the command line hush crashes.

For example:
/home/user $ $notdefined

crashes hush

I've attached a patch that prevents this from happening, not sure if it should be the final solution though.

Thanks,

Mikel
Comment 1 Denys Vlasenko 2010-01-12 05:36:20 UTC
Can't reproduce:

# ./busybox hush
/usr/srcdevel/bbox/fix/busybox.t5 # /home/user $ $notdefined
hush: can't execute '/home/user': No such file or directory
/usr/srcdevel/bbox/fix/busybox.t5 #
Comment 2 Mikel Garai 2010-01-12 08:40:54 UTC
Hi, 

sorry for the misunderstanding, the "/home/user$ " suppose to be the prompt. The actual command should be:

$whatevernotdefinedvariable

thanks for the quick response,

Mikel
Comment 3 Denys Vlasenko 2010-01-30 23:16:53 UTC
This does not happen in 1.15.3