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


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

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

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

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

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

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

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

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