gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue May 27 16:29:53 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/1f303f7b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7daad042 (commit)
	from  https://github.com/Gnucash/gnucash/commit/75114b7c (commit)



commit 1f303f7b81a5dd5e9e1b71871b4c023623109a77
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue May 27 14:19:27 2014 -0700

    More fix-ups for the renumber subaccounts dialog.
    
    Add more invariant checks for safety.
    Suppress the '-' in the account-number format if the prefix is empty.
    Set the value for the interval GtkSpinButton so that it won't be 0 on startup.
    Fix the step-increment and page-increment property names in the builder file
    so that they have an effect.

commit 7daad042d0b5e426d0c5153d71abf69bd071fd4b
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue May 27 14:15:41 2014 -0700

    Bug 725054 - Re-numbering sub accounts crashes the program
    
    g_strdup_printf ("%s-%0*d", prefix, num_digits, interval) calls malloc()
    with the number of required characters, which includes num_digits characters
    for the numeric. If the interval is 0, log10(num_children * interval) is
    log10(0), which returns NAN (not a number), which when cast to size_t is
    MAXINT. That generates a malloc error, which crashes GnuCash.
    
    So don't let the interval be 0.



Summary of changes:
 src/gnome-utils/dialog-account.c                | 60 +++++++++++++++++++------
 src/gnome-utils/gtkbuilder/dialog-account.glade |  5 ++-
 2 files changed, 50 insertions(+), 15 deletions(-)



More information about the gnucash-patches mailing list