summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-28 08:31:51 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-28 08:58:40 +0100
commit8a31ed10c8ed91b35f9fa3831e76ddb819fab88a (patch)
treeddb3d0a1362c92d8c7b26f8f92f7c035ffe261ce
parent7f156c4019165dff0f1aec4ab660f23824167e00 (diff)
migration: check for epoch time as minimum year
-rw-r--r--migration/migration.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/migration/migration.cpp b/migration/migration.cpp
index d4ec6493..eda88071 100644
--- a/migration/migration.cpp
+++ b/migration/migration.cpp
@@ -50,15 +50,13 @@ void migrator::register_migration(mptr const& m)
bool ok = true;
- if (year < "2016")
- abort();
const int month_ = to_int(month, ok), day_ = to_int(day, ok);
(void) to_int(year, ok);
(void) to_int(serial, ok);
- if (!ok)
+ if (!ok || year < 1970)
abort();
if (month_ < 1 || month_ > 12)