Don't use '-z defs' if sanitizers are used
[openssl.git] / engines / e_ossltest.c
index 2bda610f46d413157b6dcf667d4584d68740b0df..1284742ec321ede14d8a451b3a2c98ba6200183b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
@@ -637,7 +637,7 @@ int ossltest_aes128_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
     EVP_CIPHER_meth_get_do_cipher(EVP_aes_128_gcm())(ctx, out, in, inl);
 
     /* Throw it all away and just use the plaintext as the output */
-    if (tmpbuf != NULL)
+    if (tmpbuf != NULL && out != NULL)
         memcpy(out, tmpbuf, inl);
     OPENSSL_free(tmpbuf);