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


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

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

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

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

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

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

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

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