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


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

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

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

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

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

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

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

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