buggnokii - Bugs: bug #17831, gnokii --setdatetime ->...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17831: gnokii --setdatetime -> Segmentation fault

Submitted by:  None
Submitted on:  Sat 23 Sep 2006 08:05:08 PM UTC  
 
Category: gnokiiSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Pawel Kot <pkot>
Open/Closed: Closed

Sat 30 Sep 2006 05:07:57 PM UTC, comment #1:

Fixed in CVS. Will be in the next release

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Sat 23 Sep 2006 08:05:08 PM UTC, original submission:

% gnokii --setdatetime
GNOKII Version 0.6.14
Segmentation fault

The option setdatetime always core dumps on my system. There is a bug in the function setdatetime in gnokii-settings.c. The code says

switch (argc - optind) {
[...]
case 0:
date.year = atoi(argv[optind]);
break;

If you execute "gnokii --setdatetime", argc and optind are both equal to 2. gnokii thus calls atoi(argv[2]) which is atoi(0) and a core dump. The easy fix is to change the switch to

switch (argc - optind - 1) {

or to add 1 to all the cases in the switch.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 30 Sep 2006 05:07:57 PM UTCpkotStatusNone=>Fixed
  Assigned toNone=>pkot
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1