engines/e_ossltest.c:629: error: NULL_DEREFERENCE
  pointer `tmpbuf` last assigned on line 622 could be null and is dereferenced by call to `memcpy()` at line 629, column 5.
Showing all 11 steps of the trace


engines/e_ossltest.c:619:1: start of procedure ossltest_aes128_gcm_cipher()
617.   
618.   
619. > int ossltest_aes128_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
620.                                  const unsigned char *in, size_t inl)
621.   {

engines/e_ossltest.c:622:5: 
620.                                  const unsigned char *in, size_t inl)
621.   {
622. >     unsigned char *tmpbuf = OPENSSL_malloc(inl);
623.   
624.       /* OPENSSL_malloc will return NULL if inl == 0 */

crypto/mem.c:189:1: start of procedure CRYPTO_malloc()
  187.   #endif
  188.   
  189. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  190.   {
  191.       void *ret = NULL;

crypto/mem.c:191:5: 
  189.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  190.   {
  191. >     void *ret = NULL;
  192.   
  193.       INCREMENT(malloc_count);

crypto/mem.c:194:9: Taking true branch
  192.   
  193.       INCREMENT(malloc_count);
  194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  195.           return malloc_impl(num, file, line);
  196.   

crypto/mem.c:194:32: Taking true branch
  192.   
  193.       INCREMENT(malloc_count);
  194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                        ^
  195.           return malloc_impl(num, file, line);
  196.   

crypto/mem.c:195:9: Skipping __function_pointer__(): unresolved function pointer
  193.       INCREMENT(malloc_count);
  194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
  195.           return malloc_impl(num, file, line);
                 ^
  196.   
  197.       if (num == 0)

crypto/mem.c:216:1: return from a call to CRYPTO_malloc
  214.   
  215.       return ret;
  216. > }
  217.   
  218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

engines/e_ossltest.c:625:9: Taking true branch
623.   
624.       /* OPENSSL_malloc will return NULL if inl == 0 */
625.       if (tmpbuf == NULL && inl > 0)
               ^
626.           return -1;
627.   

engines/e_ossltest.c:625:27: Taking false branch
623.   
624.       /* OPENSSL_malloc will return NULL if inl == 0 */
625.       if (tmpbuf == NULL && inl > 0)
                                 ^
626.           return -1;
627.   

engines/e_ossltest.c:629:5: 
627.   
628.       /* Remember what we were asked to encrypt */
629. >     memcpy(tmpbuf, in, inl);
630.   
631.       /* Go through the motions of encrypting it */
