gnucash maint: Clamp time64 values passed to GDateTime functions to the valid range.

John Ralls jralls at code.gnucash.org
Fri Jun 16 18:32:08 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/5f8f9b9a (commit)
	from  https://github.com/Gnucash/gnucash/commit/385ca0c3 (commit)



commit 5f8f9b9a8481651ca92ced8bb5d662a53175953d
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jun 16 15:31:49 2017 -0700

    Clamp time64 values passed to GDateTime functions to the valid range.
    
    Fixes a bug reported on the mailing list wherein a date of 0000-00-00
    in a MySql database would crash GnuCash. Such dates may come from a bad
    conversion of 1970-01-01 or from a crash.



Summary of changes:
 src/libqof/qof/gnc-date.c           | 29 +++++++++++-----
 src/libqof/qof/gnc-date.h           |  5 +--
 src/libqof/qof/test/test-gnc-date.c | 68 ++++++++++++++++---------------------
 3 files changed, 53 insertions(+), 49 deletions(-)



More information about the gnucash-patches mailing list