diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp index edd6eac9b8..3107f1a311 100644 --- a/libgnucash/engine/gnc-date.cpp +++ b/libgnucash/engine/gnc-date.cpp @@ -936,6 +936,9 @@ qof_scan_date_internal (const char *buff, int *day, int *month, int *year, g_free (dupe); + if ((imonth == 0) || (iday == 0)) + return FALSE; + if ((12 < imonth) || (31 < iday)) { /*