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


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

crypto/mem.c:332:2: 
330.   char *CRYPTO_strdup(const char *str, const char *file, int line)
331.   	{
332. > 	char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
333.   
334.   	strcpy(ret, str);

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

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

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

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

crypto/mem.c:329:2: return from a call to CRYPTO_malloc
  327.   
  328.   	return ret;
  329.   	}
          ^
  330.   char *CRYPTO_strdup(const char *str, const char *file, int line)
  331.   	{

crypto/mem.c:334:2: 
332.   	char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
333.   
334. > 	strcpy(ret, str);
335.   	return ret;
336.   	}
