From 0dac84f72104947be395f09f488d60dbb4b332a0 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Mon, 5 Oct 2015 06:13:59 +0000 Subject: 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@ --- lib/libssl/src/crypto/asn1/a_time_tm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libssl') diff --git a/lib/libssl/src/crypto/asn1/a_time_tm.c b/lib/libssl/src/crypto/asn1/a_time_tm.c index 7b25e439c4c..81a92ad6d80 100644 --- a/lib/libssl/src/crypto/asn1/a_time_tm.c +++ b/lib/libssl/src/crypto/asn1/a_time_tm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_time_tm.c,v 1.2 2015/10/04 15:15:11 jsing Exp $ */ +/* $OpenBSD: a_time_tm.c,v 1.3 2015/10/05 06:13:58 jsing Exp $ */ /* * Copyright (c) 2015 Bob Beck * @@ -120,7 +120,7 @@ asn1_time_parse(const char *bytes, size_t len, struct tm *tm, int mode) char *t = buf + i; if (isdigit((unsigned char)*t)) continue; - if (*t == '.' && dot == NULL) { + if (*t == '.' && dot == NULL && tz == NULL) { dot = t; continue; } -- cgit v1.2.3