bugGNU Kart - Bugs: bug #47048, Command line args causing segfault

 
 

bug #47048: Command line args causing segfault

Submitted by:  David Benoit <benoid64>
Submitted on:  Tue 02 Feb 2016 10:37:13 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  sebastien diaz <sebdiaz>
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 02 Feb 2016 10:37:13 PM UTC, original submission:
  • Expected result: program handles invalid parameters
  • Actual Result: program crashes with segfault

*Steps to reproduce:
1) Run program with a flag that takes another argument, but
do not supply the argument. ex:
./gnukart -w
./gnukart -h
2) Program segfaults

  • Steps to fix:

1) Update main.c function parse_args()
- all conditionals currently attempt to check for
invalid num args by evaluating the statement
if (argc < i + 1)
- they should check to see if (argc <= i + 1)
2) Segfault error is fixed

David Benoit <benoid64>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by benoid64 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-23 sebdiaz StatusNone => Fixed
        Assigned toNone => sebdiaz

    Back to the top


    Powered by Savane 3.3