AUDIT: r20570 - gnucash/trunk/src/engine - Bug #647945: Add sanity check to hopefully fix crash when running custom reports

Christian Stimming cstim at code.gnucash.org
Tue Apr 19 16:15:48 EDT 2011


Author: cstim
Date: 2011-04-19 16:15:48 -0400 (Tue, 19 Apr 2011)
New Revision: 20570
Trac: http://svn.gnucash.org/trac/changeset/20570

Modified:
   gnucash/trunk/src/engine/engine-helpers.c
Log:
Bug #647945: Add sanity check to hopefully fix crash when running custom reports
BP

Modified: gnucash/trunk/src/engine/engine-helpers.c
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.c	2011-04-19 19:12:59 UTC (rev 20569)
+++ gnucash/trunk/src/engine/engine-helpers.c	2011-04-19 20:15:48 UTC (rev 20570)
@@ -142,7 +142,8 @@
     GncGUID guid;
     const gchar * str;
 
-    if (GUID_ENCODING_LENGTH != scm_c_string_length (guid_scm))
+    if (!scm_is_string(guid_scm)
+        || (GUID_ENCODING_LENGTH != scm_c_string_length (guid_scm)))
     {
         return *guid_null();
     }



More information about the gnucash-changes mailing list