diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-04 11:30:59 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-04 11:30:59 +0000 |
commit | 4f59432c0650db1da3255ea61f78c817ee98eaf5 (patch) | |
tree | d9d5d057596ff69c71eb2b5e376c162452d4fe7e /crypto/x509 | |
parent | 2d1cbca9605aa3a7f85d803aa17a71d6c283c93c (diff) |
Oops, s can be NULL
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_vfy.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 62b01441b6..c680980f8a 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -1759,17 +1759,15 @@ ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, int offset_day, long offset_sec, time_t *in_tm) { time_t t; - int type = -1; if (in_tm) t = *in_tm; else time(&t); - if (s) type = s->type; - if (!(s->flags & ASN1_STRING_FLAG_MSTRING)) + if (s && !(s->flags & ASN1_STRING_FLAG_MSTRING)) { - if (type == V_ASN1_UTCTIME) + if (s->type == V_ASN1_UTCTIME) return ASN1_UTCTIME_adj(s,t, offset_day, offset_sec); - if (type == V_ASN1_GENERALIZEDTIME) + if (s->type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_adj(s, t, offset_day, offset_sec); } |