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

 
 

bug #47048: Command line args causing segfault

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

Add a New Comment Rich Markup
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.13-f8d8.
    Corresponding source code