audk/CryptoPkg
Laszlo Ersek 4a066c7b27 CryptoPkg: OpensslLib: reintroduce EFIAPI for ERR_add_error_data()
Git commit f93f78ea70 (SVN r17633), with subject "CryptoPkg: Update
openssl patch file from 0.9.8zf to 1.0.2c", replaced the file

  CryptoPkg/Library/OpensslLib/EDKII_openssl-0.9.8zf.patch

with

  CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2c.patch

In the process, two hunks were lost that used to add EFIAPI to the
declaration of the variadic function ERR_add_error_data().

The VA_START() macro, from "MdePkg/Include/Base.h", expands to an
EFIAPI-dependent implementation when

  !defined(__CC_ARM) && (!defined(__GNUC__) ||
                         defined(NO_BUILTIN_VA_FUNCS))

Under such circumstances, the va_start() macro invocation in
ERR_add_error_data() -- which is translated to VA_START() by
"CryptoPkg/Include/OpenSslSupport.h" -- results in EFIAPI-dependent code,
but callers of the function pass the arguments incorrectly, because the
declaration doesn't state EFIAPI.

This leads to crashes when ERR_add_error_vdata(), called by
ERR_add_error_data(), tries to access the arguments forwarded to it.

Restore the missing hunk from before SVN r17633.

Cc: Qin Long <qin.long@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Peter Jones <pjones@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Peter Jones <pjones@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Qin Long <qin.long@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17689 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-23 14:54:00 +00:00
..
Application/Cryptest CryptoPkg Updates to support RFC3161 timestamp signature verification. 2014-11-12 08:51:45 +00:00
CryptRuntimeDxe CryptoPkg: Convert non DOS format files to DOS format 2014-09-03 08:56:12 +00:00
Include CryptoPkg: Add some comments for API usage clarification. 2015-06-19 02:46:51 +00:00
Library CryptoPkg: OpensslLib: reintroduce EFIAPI for ERR_add_error_data() 2015-06-23 14:54:00 +00:00
.gitignore CryptoPkg: add .gitignore for OpenSSL source files 2015-06-16 15:09:19 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
CryptoPkg.dec Update CryptoPkg package version to 0.94. 2014-09-02 07:08:30 +00:00
CryptoPkg.dsc Update CryptoPkg package version to 0.94. 2014-09-02 07:08:30 +00:00
CryptoPkg.uni CryptoPkg: Convert non DOS format files to DOS format 2014-09-03 08:56:12 +00:00
CryptoPkgExtra.uni CryptoPkg: INF/DEC file updates to EDK II packages 2014-08-28 05:52:56 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00