Bug 853 - HUSH: closes when given undefined variable as only argument
Summary: HUSH: closes when given undefined variable as only argument
Status: RESOLVED WORKSFORME
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.15.x
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 16:50 UTC by Mikel Garai
Modified: 2010-01-30 23:16 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
quick fix for this bug (367 bytes, patch)
2010-01-11 16:50 UTC, Mikel Garai
Details

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