crypto/asn1/a_utctm.c:298: error: NULL_DEREFERENCE
  pointer `tm` last assigned on line 291 could be null and is dereferenced at line 298, column 2.
Showing all 8 steps of the trace


crypto/asn1/a_utctm.c:269:1: start of procedure ASN1_UTCTIME_cmp_time_t()
267.   
268.   
269. > int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
270.   	{
271.   	struct tm *tm;

crypto/asn1/a_utctm.c:277:6: Taking true branch
275.   #define g2(p) (((p)[0]-'0')*10+(p)[1]-'0')
276.   
277.   	if (s->data[12] == 'Z')
            ^
278.   		offset=0;
279.   	else

crypto/asn1/a_utctm.c:278:3: 
276.   
277.   	if (s->data[12] == 'Z')
278. > 		offset=0;
279.   	else
280.   		{

crypto/asn1/a_utctm.c:286:2: 
284.   		}
285.   
286. > 	t -= offset*60; /* FIXME: may overflow in extreme cases */
287.   
288.   #if defined(THREADS) && !defined(WIN32)

crypto/asn1/a_utctm.c:291:2: 
289.   	{ struct tm data; gmtime_r(&t, &data); tm = &data; }
290.   #else
291. > 	tm = gmtime(&t);
292.   #endif
293.   	

crypto/asn1/a_utctm.c:295:2: 
293.   	
294.   #define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
295. > 	year = g2(s->data);
296.   	if (year < 50)
297.   		year += 100;

crypto/asn1/a_utctm.c:296:6: Taking false branch
294.   #define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
295.   	year = g2(s->data);
296.   	if (year < 50)
            ^
297.   		year += 100;
298.   	return_cmp(year,              tm->tm_year);

crypto/asn1/a_utctm.c:298:2: 
296.   	if (year < 50)
297.   		year += 100;
298. > 	return_cmp(year,              tm->tm_year);
299.   	return_cmp(g2(s->data+2) - 1, tm->tm_mon);
300.   	return_cmp(g2(s->data+4),     tm->tm_mday);
