View Issue Details

IDProjectCategoryView StatusLast Update
0003628SOGoBackend Calendarpublic2016-04-12 19:54
Reportertimooms Assigned Toludovic  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Version2.3.10 
Fixed in Version2.3.11 
Summary0003628: unsigned int for storing offset that can be negative
Description

(at least) [SOGoAppointmentFolder _fixupRecord:] in SOGoAppointmentFolder.m is using an "unsigned int" for storing the offset. For now this causes no problems as [NSCalendarDate(OPENSTEP) dateByAddingYears:months:days:hours:minutes:seconds:] is also using int. In (at least) version 1.24.9, this is no longer the case and this is causing problems for all day events.
It also appears in the logs as "[ERROR] >UIxCalListingActions> event 'xxxxxxx' has negative start: -2147483648 (skipped)"

Steps To Reproduce

timezone: Europe/Brussels (offset: 3600 -> seconds: -3600)
all day events
install with gnustep base 1.24.9

TagsNo tags attached.

Activities

ludovic

ludovic

2016-04-11 14:39

administrator   ~0009958

All the GNUstep versions I see, including 1.24.9 has the following method signature:

  • (NSInteger) secondsFromGMTForDate: (NSDate*)aDate;
timooms

timooms

2016-04-11 17:59

reporter   ~0009960

It's about this specific method:

2607 @implementation NSCalendarDate (OPENSTEP)
2608
2609 - (NSCalendarDate) dateByAddingYears: (NSInteger)years
2610 months: (NSInteger)months
2611 days: (NSInteger)days
2612 hours: (NSInteger)hours
2613 minutes: (NSInteger)minutes
2614 seconds: (NSInteger)seconds
2615 {
2616 NSCalendarDate
c;
2617 NSTimeInterval s;
2618 NSTimeInterval oldOffset;
2619 NSTimeInterval newOffset;
2620 NSInteger i, year, month, day, hour, minute, second, mil;

last line was original (in 1.24.6)
2610 int i, year, month, day, hour, minute, second, mil;

ludovic

ludovic

2016-04-12 19:54

administrator   ~0009968

Fixed in 2.3.11 and 3.0.3.

Related Changesets

sogo: master 1e8a5652

2016-04-11 15:55

ludovic


Details Diff
(fix) adjust offset datatype to avoid int overflows (fixes 0003628) Affected Issues
0003628
mod - SoObjects/Appointments/SOGoAppointmentFolder.m Diff File

sogo: v2 c091c051

2016-04-11 15:55

ludovic


Details Diff
(fix) adjust offset datatype to avoid int overflows (fixes 0003628) Affected Issues
0003628
mod - SoObjects/Appointments/SOGoAppointmentFolder.m Diff File

Issue History

Date Modified Username Field Change
2016-04-11 14:27 timooms New Issue
2016-04-11 14:39 ludovic Note Added: 0009958
2016-04-11 17:59 timooms Note Added: 0009960
2016-04-11 19:56 ludovic Changeset attached => sogo master 1e8a5652
2016-04-11 19:56 ludovic Assigned To => ludovic
2016-04-11 19:56 ludovic Resolution open => fixed
2016-04-11 19:56 ludovic Changeset attached => sogo v2 c091c051
2016-04-12 19:54 ludovic Note Added: 0009968
2016-04-12 19:54 ludovic Status new => resolved
2016-04-12 19:54 ludovic Fixed in Version => 2.3.11