crypto/mem.c:330: error: NULL_DEREFERENCE
  pointer `ret` last assigned on line 328 could be null and is dereferenced by call to `strcpy()` at line 330, column 2.
Showing all 8 steps of the trace


crypto/mem.c:326:1: start of procedure CRYPTO_strdup()
324.   	return ret;
325.   	}
326. > char *CRYPTO_strdup(const char *str, const char *file, int line)
327.   	{
328.   	char *ret = CRYPTO_malloc(strlen(str)+1, file, line);

crypto/mem.c:328:2: 
326.   char *CRYPTO_strdup(const char *str, const char *file, int line)
327.   	{
328. > 	char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
329.   
330.   	strcpy(ret, str);

crypto/mem.c:295:1: start of procedure CRYPTO_malloc()
  293.   	}
  294.   
  295. > void *CRYPTO_malloc(int num, const char *file, int line)
  296.   	{
  297.   	void *ret = NULL;

crypto/mem.c:297:2: 
  295.   void *CRYPTO_malloc(int num, const char *file, int line)
  296.   	{
  297. > 	void *ret = NULL;
  298.   
  299.   	if (num <= 0) return NULL;

crypto/mem.c:299:6: Taking true branch
  297.   	void *ret = NULL;
  298.   
  299.   	if (num <= 0) return NULL;
              ^
  300.   
  301.   	allow_customize = 0;

crypto/mem.c:299:16: 
  297.   	void *ret = NULL;
  298.   
  299. > 	if (num <= 0) return NULL;
  300.   
  301.   	allow_customize = 0;

crypto/mem.c:325:2: return from a call to CRYPTO_malloc
  323.   
  324.   	return ret;
  325.   	}
          ^
  326.   char *CRYPTO_strdup(const char *str, const char *file, int line)
  327.   	{

crypto/mem.c:330:2: 
328.   	char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
329.   
330. > 	strcpy(ret, str);
331.   	return ret;
332.   	}
