gnomecal obscure bug



Not sure where to send this, so here it is:

Was playing around with importing a vcal data taken from my palm-pilot
using (gasp) kpilot into gnomecal.

Seems it was creating an infinite loop in the function
"ical_object_generate_events" near line 1310 or so under the case
RECUR_MONTHLY_BY_DAY.  The "current" variable was not being
incremented, and hence the final date never reached.

In the course of debugging, I found that adding a do-nothing time
conversion function (either localtime(&current) or ctime(&current) at
line 1314) fixed the problem.

A function which outputs (explicitly) to nothing should (in my
experience) have no effect on the course of the program.  The man
page for ctime states that some global timezone variables are set,
but it doesn't seem like they would change much nor should they
seriously impact time which is stepping months.

Given all this, can anyone tell me:

a) Has this bug been noticed before ?

b) Is this a compiler issue or is there something strange with my
	glibc (libc-2.0.7) which messes up these calls ?
   In other words "WTF" ?

c) Should the source be changed ?

FWIW after changing this, the data imported fine.  Nice work !

thanks,




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]