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


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

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

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

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

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

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

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

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