r20056 - gnucash/trunk/src/libqof/qof - Bug #638543: Validate counter format strings before using them.

Christian Stimming cstim at code.gnucash.org
Mon Jan 10 16:39:29 EST 2011


Author: cstim
Date: 2011-01-10 16:39:29 -0500 (Mon, 10 Jan 2011)
New Revision: 20056
Trac: http://svn.gnucash.org/trac/changeset/20056

Modified:
   gnucash/trunk/src/libqof/qof/qofbook.c
   gnucash/trunk/src/libqof/qof/qofbook.h
Log:
Bug #638543: Validate counter format strings before using them.

Patch by Matthijs Kooijman:

The validation function is a very simple "parser" that simply checks for
a single gint64 conversion specification, allowing all modifiers and
flags that printf(3) specifies (except for the * width and precision,
which need an extra argument).

The validation function returns an error message that is used to log a
warning and can be used by the GUI later on.



More information about the gnucash-patches mailing list