audk/ArmPkg/Library/DefaultExceptionHandlerLib
Laszlo Ersek a1848bc088 ArmPkg/DefaultExceptionHandlerLib: replace AsciiStrCat() with AsciiStrCatS()
AsciiStrCat() is deprecated / disabled under the
DISABLE_NEW_DEPRECATED_INTERFACES feature test macro.

The caller of CpsrString() is required to pass in "ReturnStr" with 32
CHAR8 elements. (DefaultExceptionHandler() complies with this.) "Str" is
used to build "ReturnStr" gradually. Just before calling AsciiStrCat(),
"Str" points to the then-terminating NUL character in "ReturnStr".

The difference (Str - ReturnStr) gives the number of non-NUL characters
we've written thus far, hence (32 - (Str - ReturnStr)) yields the number
of remaining bytes in ReturnStr, including the ultimately terminating NUL
character.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael Zimmermann <sigmaepsilon92@gmail.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=164
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-10-25 10:46:42 +02:00
..
AArch64 ArmPkg/DefaultExceptionHandlerLib: improve formatting of backtrace 2016-09-14 14:48:10 +01:00
Arm ArmPkg/DefaultExceptionHandlerLib: replace AsciiStrCat() with AsciiStrCatS() 2016-10-25 10:46:42 +02:00
DefaultExceptionHandlerBase.c ArmPkg: Fixed unsigned type to be architecture independent 2013-03-12 00:50:46 +00:00
DefaultExceptionHandlerLib.inf ArmPkg: DefaultExceptionHandler fixes for use with DxeCore 2016-02-15 10:37:52 +01:00
DefaultExceptionHandlerLibBase.inf ArmPkg: Added Aarch64 support 2013-07-18 18:07:46 +00:00
DefaultExceptionHandlerUefi.c ArmPkg: DefaultExceptionHandler fixes for use with DxeCore 2016-02-15 10:37:52 +01:00