crypto/x509v3/v3nametest.c:273: error: NULL_DEREFERENCE
  pointer `name` last assigned on line 271 could be null and is dereferenced by call to `memcpy()` at line 273, column 3.
Showing all 8 steps of the trace


crypto/x509v3/v3nametest.c:263:1: start of procedure run_cert()
261.   	}
262.   
263. > static void run_cert(X509 *crt, const char *nameincert,
264.   		     const struct set_name_fn *fn)
265.   	{

crypto/x509v3/v3nametest.c:266:2: 
264.   		     const struct set_name_fn *fn)
265.   	{
266. > 	const char *const *pname = names;
267.   	while (*pname)
268.   		{

crypto/x509v3/v3nametest.c:267:9: Loop condition is true. Entering loop body
265.   	{
266.   	const char *const *pname = names;
267.   	while (*pname)
               ^
268.   		{
269.   		int samename = strcasecmp(nameincert, *pname) == 0;

crypto/x509v3/v3nametest.c:269:18: Condition is false
267.   	while (*pname)
268.   		{
269.   		int samename = strcasecmp(nameincert, *pname) == 0;
                        ^
270.   		size_t namelen = strlen(*pname);
271.   		char *name = malloc(namelen);

crypto/x509v3/v3nametest.c:269:3: 
267.   	while (*pname)
268.   		{
269. > 		int samename = strcasecmp(nameincert, *pname) == 0;
270.   		size_t namelen = strlen(*pname);
271.   		char *name = malloc(namelen);

crypto/x509v3/v3nametest.c:270:3: 
268.   		{
269.   		int samename = strcasecmp(nameincert, *pname) == 0;
270. > 		size_t namelen = strlen(*pname);
271.   		char *name = malloc(namelen);
272.   		int match, ret;

crypto/x509v3/v3nametest.c:271:3: 
269.   		int samename = strcasecmp(nameincert, *pname) == 0;
270.   		size_t namelen = strlen(*pname);
271. > 		char *name = malloc(namelen);
272.   		int match, ret;
273.   		memcpy(name, *pname, namelen);

crypto/x509v3/v3nametest.c:273:3: 
271.   		char *name = malloc(namelen);
272.   		int match, ret;
273. > 		memcpy(name, *pname, namelen);
274.   
275.   		ret = X509_check_host(crt, (const unsigned char *)name,
