It's not good to have a pointer point at something in an inner block.
PR: 66
This commit is contained in:
parent
231360a3b7
commit
2cddcd1dbb
@ -222,6 +222,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
|||||||
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
||||||
{
|
{
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
|
struct tm data;
|
||||||
int offset;
|
int offset;
|
||||||
int year;
|
int year;
|
||||||
|
|
||||||
@ -238,7 +239,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
|||||||
|
|
||||||
t -= offset*60; /* FIXME: may overflow in extreme cases */
|
t -= offset*60; /* FIXME: may overflow in extreme cases */
|
||||||
|
|
||||||
{ struct tm data; tm = OPENSSL_gmtime(&t, &data); }
|
tm = OPENSSL_gmtime(&t, &data);
|
||||||
|
|
||||||
#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
|
#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
|
||||||
year = g2(s->data);
|
year = g2(s->data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user