Bug#505972: Correctly size the GUID string buffer; should resolve 2.2.2 SX crashes.

BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16766 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Joshua Sled
2007-12-29 22:36:07 +00:00
parent 0ed4af2ef1
commit 7c71c843f8

View File

@@ -261,7 +261,7 @@ Account*
gnc_sx_get_template_transaction_account(SchedXaction *sx)
{
Account *template_root, *sx_template_acct;
char sx_guid_str[GUID_ENCODING_LENGTH];
char sx_guid_str[GUID_ENCODING_LENGTH+1];
template_root = gnc_book_get_template_root(gnc_get_current_book());
guid_to_string_buff(xaccSchedXactionGetGUID(sx), sx_guid_str);
@@ -923,7 +923,7 @@ _get_template_split_account(GncSxInstance *instance, Split *template_split, Acco
*split_acct = xaccAccountLookup(acct_guid, gnc_get_current_book());
if (*split_acct == NULL)
{
char guid_str[GUID_ENCODING_LENGTH];
char guid_str[GUID_ENCODING_LENGTH+1];
GString *err;
guid_to_string_buff((const GUID*)acct_guid, guid_str);
err = g_string_new("");