diff options
| author | jsing <> | 2015-10-05 06:13:58 +0000 |
|---|---|---|
| committer | jsing <> | 2015-10-05 06:13:58 +0000 |
| commit | f772e1b34a6a83ae91c4de70256febbace999f14 (patch) | |
| tree | 4358a08d2c1e1c7d210872a29162640fac1c2040 /src/lib/libc | |
| parent | 8f9432c9662a11c4974baafc30994709db527838 (diff) | |
| download | openbsd-f772e1b34a6a83ae91c4de70256febbace999f14.tar.gz openbsd-f772e1b34a6a83ae91c4de70256febbace999f14.tar.bz2 openbsd-f772e1b34a6a83ae91c4de70256febbace999f14.zip | |
Make sure dot is not set after tz - fixes incorrect handling, which allows
20151005171301+1.09Z to be treated as a valid time.
ok beck@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time_tm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c index 7b25e439c4..81a92ad6d8 100644 --- a/src/lib/libcrypto/asn1/a_time_tm.c +++ b/src/lib/libcrypto/asn1/a_time_tm.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_time_tm.c,v 1.2 2015/10/04 15:15:11 jsing Exp $ */ | 1 | /* $OpenBSD: a_time_tm.c,v 1.3 2015/10/05 06:13:58 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -120,7 +120,7 @@ asn1_time_parse(const char *bytes, size_t len, struct tm *tm, int mode) | |||
| 120 | char *t = buf + i; | 120 | char *t = buf + i; |
| 121 | if (isdigit((unsigned char)*t)) | 121 | if (isdigit((unsigned char)*t)) |
| 122 | continue; | 122 | continue; |
| 123 | if (*t == '.' && dot == NULL) { | 123 | if (*t == '.' && dot == NULL && tz == NULL) { |
| 124 | dot = t; | 124 | dot = t; |
| 125 | continue; | 125 | continue; |
| 126 | } | 126 | } |
