summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/times.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/times.cc b/src/times.cc
index ffd62428..acdf7eb0 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -237,6 +237,10 @@ string_to_month_of_year(const std::string& str)
datetime_t parse_datetime(const char * str)
{
+ if (std::strlen(str) > 127) {
+ throw_(date_error, _f("Invalid date: %1%") % str);
+ }
+
char buf[128];
std::strcpy(buf, str);