If gmtime() returned NULL (and we couldn't fix it à la VMS), let's
authorRichard Levitte <levitte@openssl.org>
Fri, 16 Aug 2002 11:55:54 +0000 (11:55 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 16 Aug 2002 11:55:54 +0000 (11:55 +0000)
return NULL.
PR: 228

crypto/asn1/a_utctm.c

index dd5955ac9fdd778095bb23252cc6ed332c367831..1aafb663f6a3e838c8001ccbecf1cac7fb6aa9d9 100644 (file)
@@ -246,6 +246,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
                ts=(struct tm *)localtime(&t);
                }
 #endif
+       if (ts == NULL)
+               return(NULL);
        p=(char *)s->data;
        if ((p == NULL) || (s->length < 14))
                {