diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/converter.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 48ad958d5692..6642a60c4d8a 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -1545,8 +1545,12 @@ static bool lcl_parseDate( if (!bIgnoreInvalidOrMissingDate) { bSuccess &= (0 < nDay); + } + if (nMonth > 0) // not possible to check if month was missing + { bSuccess &= (nDay <= lcl_MaxDaysPerMonth(nMonth, nYear)); } + else assert(bIgnoreInvalidOrMissingDate); } if (bSuccess && (nPos < string.getLength())) |