crypto/asn1/a_time.c:126: error: NULL_DEREFERENCE
  pointer `ts` last assigned on line 124 could be null and is dereferenced at line 126, column 6.
Showing all 3 steps of the trace


crypto/asn1/a_time.c:113:1: start of procedure ASN1_TIME_set()
111.   
112.   
113. > ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
114.   	{
115.   	struct tm *ts;

crypto/asn1/a_time.c:124:2: 
122.   	ts=&data; /* should return &data, but doesn't on some systems, so we don't even look at the return value */
123.   #else
124. > 	ts=gmtime(&t);
125.   #endif
126.   	if((ts->tm_year >= 50) && (ts->tm_year < 150))

crypto/asn1/a_time.c:126:6: 
124.   	ts=gmtime(&t);
125.   #endif
126. > 	if((ts->tm_year >= 50) && (ts->tm_year < 150))
127.   					return ASN1_UTCTIME_set(s, t);
128.   	return ASN1_GENERALIZEDTIME_set(s,t);

ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
	{
	struct tm *ts;
#if defined(THREADS) && !defined(WIN32)
	struct tm data;
#endif
#if defined(THREADS) && !defined(WIN32)
	gmtime_r(&t,&data);
	ts=&data;
#else
	ts=gmtime(&t);
#endif
	if((ts->tm_year >= 50) && (ts->tm_year < 150))
					return ASN1_UTCTIME_set(s, t);
	return ASN1_GENERALIZEDTIME_set(s,t);
	}
['ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)\n\t{\n\tstruct tm *ts;\n#if defined(THREADS) && !defined(WIN32)\n\tstruct tm data;\n#endif\n#if defined(THREADS) && !defined(WIN32)\n\tgmtime_r(&t,&data);\n\tts=&data;\n#else\n\tts=gmtime(&t);\n#endif\n\tif((ts->tm_year >= 50) && (ts->tm_year < 150))\n\t\t\t\t\treturn ASN1_UTCTIME_set(s, t);\n\treturn ASN1_GENERALIZEDTIME_set(s,t);\n\t}']