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


crypto/x509v3/v3nametest.c:255:1: start of procedure run_cert()
253.   	}
254.   
255. > static void run_cert(X509 *crt, const char *nameincert,
256.   		     const struct set_name_fn *fn)
257.   	{

crypto/x509v3/v3nametest.c:258:2: 
256.   		     const struct set_name_fn *fn)
257.   	{
258. > 	const char *const *pname = names;
259.   	while (*pname)
260.   		{

crypto/x509v3/v3nametest.c:259:9: Loop condition is true. Entering loop body
257.   	{
258.   	const char *const *pname = names;
259.   	while (*pname)
               ^
260.   		{
261.   		int samename = strcasecmp(nameincert, *pname) == 0;

crypto/x509v3/v3nametest.c:261:18: Condition is false
259.   	while (*pname)
260.   		{
261.   		int samename = strcasecmp(nameincert, *pname) == 0;
                        ^
262.   		size_t namelen = strlen(*pname);
263.   		char *name = malloc(namelen);

crypto/x509v3/v3nametest.c:261:3: 
259.   	while (*pname)
260.   		{
261. > 		int samename = strcasecmp(nameincert, *pname) == 0;
262.   		size_t namelen = strlen(*pname);
263.   		char *name = malloc(namelen);

crypto/x509v3/v3nametest.c:262:3: 
260.   		{
261.   		int samename = strcasecmp(nameincert, *pname) == 0;
262. > 		size_t namelen = strlen(*pname);
263.   		char *name = malloc(namelen);
264.   		int match, ret;

crypto/x509v3/v3nametest.c:263:3: 
261.   		int samename = strcasecmp(nameincert, *pname) == 0;
262.   		size_t namelen = strlen(*pname);
263. > 		char *name = malloc(namelen);
264.   		int match, ret;
265.   		memcpy(name, *pname, namelen);

crypto/x509v3/v3nametest.c:265:3: 
263.   		char *name = malloc(namelen);
264.   		int match, ret;
265. > 		memcpy(name, *pname, namelen);
266.   
267.   		ret = X509_check_host(crt, (const unsigned char *)name,
