gnucash unstable: Fix gnc_get_default_report_font_family returning bad string.

John Ralls jralls at code.gnucash.org
Fri Jan 5 15:31:05 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/6a9972ac (commit)
	from  https://github.com/Gnucash/gnucash/commit/c0fd3b31 (commit)



commit 6a9972aced97778dc99ecd5b10f89ab551819efc
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jan 5 12:27:39 2018 -0800

    Fix gnc_get_default_report_font_family returning bad string.
    
    pango_font_decription_get_family() returns a pointer into its struct,
    which is immediately freed so the ptr points at garbage, which was
    strduped.
    
    Instead, do the strdup before freeing font_desc.
    Also don't raise an error and do return a default value if run outside
    the GUI.



Summary of changes:
 gnucash/report/report-system/gnc-report.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)



More information about the gnucash-patches mailing list