Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 672760 - Postponed transaction applied invalid date
Part 2: GDate can represent a wider range that GDateTime, so make sure that GDates outside of the range are clamped. The GDateTime range is 1 - 9999 CE, more than wide enough for most purposes. GDate can represent out to 65535CE, but the significant difference is that a freshly-cleared GDate is 0CE, which GDateTime won't accept. That we set to the Unix Epoch 0, 1970-Jan-1. gnc_sx_incr_temporal_state can invalidate the gdate, so make sure that a valid date is stored. Adding the inst->temporal_state ptr to the sx->deferredList is wrong, it's freed shortly after adding, causing later access to the freed ptr. Add a clone instead.
- Loading branch information