From 4d55cb6692d2d74df7cc5c2fa4459f42913b5f29 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Sun, 12 Sep 2021 14:47:41 +0100 Subject: [PATCH] Comment out bogus code. Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38189 --- xmpsdk/src/XMPUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmpsdk/src/XMPUtils.cpp b/xmpsdk/src/XMPUtils.cpp index b916c3ea..8474b8dd 100644 --- a/xmpsdk/src/XMPUtils.cpp +++ b/xmpsdk/src/XMPUtils.cpp @@ -1961,7 +1961,10 @@ XMPUtils::SetTimeZone ( XMP_DateTime * xmpTime ) ansi_localtime ( &now, &tmLocal ); } else { tmLocal.tm_year = xmpTime->year - 1900; +#if 0 + // Removed to fix https://github.com/Exiv2/exiv2/issues/1901 while ( tmLocal.tm_year < 70 ) tmLocal.tm_year += 4; // ! Some versions of mktime barf on years before 1970. +#endif tmLocal.tm_mon = xmpTime->month - 1; tmLocal.tm_mday = xmpTime->day; }