r18299 - gnucash/trunk/src/app-utils - Fix index-out-of-range compilation error
Phil Longstaff
plongstaff at code.gnucash.org
Mon Sep 7 10:16:21 EDT 2009
Author: plongstaff
Date: 2009-09-07 10:16:20 -0400 (Mon, 07 Sep 2009)
New Revision: 18299
Trac: http://svn.gnucash.org/trac/changeset/18299
Modified:
gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Fix index-out-of-range compilation error
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c 2009-09-06 18:42:43 UTC (rev 18298)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c 2009-09-07 14:16:20 UTC (rev 18299)
@@ -756,8 +756,8 @@
if (!account) return NULL;
name = xaccAccountGetFullName (account);
- strncpy( result, name, sizeof(result)-1 );
- result[sizeof(result)] = '\0';
+ strncpy( result, name, sizeof(result)-2 );
+ result[sizeof(result)-1] = '\0';
return result;
}
More information about the gnucash-changes
mailing list