summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-02-27 23:43:34 +0000
committerPádraig Brady <P@draigBrady.com>2014-02-27 23:56:28 +0000
commita4faa6a0a3ae93c01d036d830ae7a21b74913baf (patch)
tree0c9f0aa37f422da9e7c8015eb588bb1f72bced16 /tests/misc
parent7bbfd1735574be80971b597b34f779fe6938a595 (diff)
downloadcoreutils-a4faa6a0a3ae93c01d036d830ae7a21b74913baf.tar.xz
date: fix crash or infinite loop when parsing a malformed TZ=""
* NEWS: Mention the fix. * gnulib: Update to incorporate the fix. This is the only change in this gnulib update. * tests/misc/date.pl: Add a test for this case. Fixes http://bugs.gnu.org/16872
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/date.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/misc/date.pl b/tests/misc/date.pl
index 57c6c7282..40be4cab5 100755
--- a/tests/misc/date.pl
+++ b/tests/misc/date.pl
@@ -287,6 +287,13 @@ my @Tests =
{ERR => "date: invalid date '\\260'\n"},
{EXIT => 1},
],
+
+ # From coreutils-5.3.0 to 8.22 inclusive
+ # this would either infinite loop or crash
+ ['invalid-TZ-crash', "-d 'TZ=\"\"\"'",
+ {ERR => "date: invalid date 'TZ=\"\"\"'\n"},
+ {EXIT => 1},
+ ],
);
# Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364.