[BusyBox 0001318]: Patch of applet.c for busybox outputting help message by itself

bugs at busybox.net bugs at busybox.net
Wed Apr 18 21:00:45 UTC 2007


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=1318 
====================================================================== 
Reported By:                rockeychu
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1318
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             04-18-2007 03:36 PDT
Last Modified:              04-18-2007 14:00 PDT
====================================================================== 
Summary:                    Patch of applet.c for busybox outputting help
message by itself
Description: 
Since SVN 18436, running "busybox" or "./busybox" doesn't show help message
anymore. The reason is: when argv[1] is NULL, argv[2] is just a illegal
address.

Patch as following:

Index: applets/applets.c
===================================================================
--- applets/applets.c   (revision 18484)
+++ applets/applets.c   (working copy)
@@ -547,7 +547,7 @@
        /* Deal with --help. Also print help when called with no arguments
*/

        if (!argv[1] || !strcmp(argv[1], "--help") ) {
-               if (argv[2]) {
+               if (argv[1] && argv[2]) {
                        /* set name for proper "<name>: applet not found"
*/
                        applet_name = argv[2];
                        argv[2] = NULL;
 
====================================================================== 

---------------------------------------------------------------------- 
 vda - 04-18-07 14:00  
---------------------------------------------------------------------- 
Fixed in rev 18491, thanks! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-18-07 03:36  rockeychu      New Issue                                    
04-18-07 03:36  rockeychu      Status                   new => assigned     
04-18-07 03:36  rockeychu      Assigned To               => BusyBox         
04-18-07 14:00  vda            Status                   assigned => closed  
04-18-07 14:00  vda            Note Added: 0002326                          
======================================================================




More information about the busybox-cvs mailing list