From 1a2e4945f16f5dff4aba518a36edf938c9234ac3 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 4 Apr 2018 16:33:30 +0000 Subject: Parse "yy" correctly for AFDate_FormatEx(). AFDate_FormatEx("yymmdd") should not try to read the first 4 digits in the string. BUG=chromium:436572 Change-Id: I123b70b8a22d1e2c87e61ee7bf0b177b49571ae3 Reviewed-on: https://pdfium-review.googlesource.com/29731 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- fxjs/cjs_publicmethods.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fxjs/cjs_publicmethods.cpp') diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp index ea4ea713d8..375eb6fd88 100644 --- a/fxjs/cjs_publicmethods.cpp +++ b/fxjs/cjs_publicmethods.cpp @@ -559,7 +559,7 @@ double CJS_PublicMethods::MakeRegularDate(const WideString& value, } else if (remaining == 1 || format[i + 2] != c) { switch (c) { case 'y': - nYear = ParseStringInteger(value, j, &nSkip, 4); + nYear = ParseStringInteger(value, j, &nSkip, 2); i += 2; j += nSkip; break; -- cgit v1.2.3