diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2016-11-21 16:22:45 +0100 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-11-21 07:22:45 -0800 |
commit | 716cb7ea87e40abb4b106df55af7ff4666170296 (patch) | |
tree | 512ecfde277f7257c8f883715ba0b2596e415db5 /src/dlls/mscordac | |
parent | 3c3ab1a269a48b81c2a57e55da76b7e5f0f24eb9 (diff) | |
download | coreclr-716cb7ea87e40abb4b106df55af7ff4666170296.tar.gz coreclr-716cb7ea87e40abb4b106df55af7ff4666170296.tar.bz2 coreclr-716cb7ea87e40abb4b106df55af7ff4666170296.zip |
Remove unsafe banned functions (#8162)
This change removes _snwprintf, _snprintf and _vsnwprintf usage from CoreCLR and
their implementations from PAL.
PAL exposes their secure variants instead and CoreCLR now uses those instead.
I have also removed the StringCchPrintfA/W, StringCchVPrintfA/W, StringCbVPrintfA/W,
StringCbPrintfA/W, StringCbPrintfExA/W, StringCchVPrintfExA/W, StringCbVPrintfExA/W
and StringCchPrintfExA/W replaced their usage by the secure variants of the sprintf
functions, since they were used at only few places and implementing all of the variants
using the secure sprintf variants would be a hassle.
I also needed to fix a missing support for size modifiers for %p formatting character
and for wide characters / strings in the secure sprintf functions that was revealed
by the PAL tests.
I have also removed a bunch of PAL tests that were using %n formatting character which
was not implemented since it is considered unsafe and translated PAL tests that were using
the removed functions to use the safe variants of those.
Diffstat (limited to 'src/dlls/mscordac')
-rw-r--r-- | src/dlls/mscordac/mscordac_unixexports.src | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dlls/mscordac/mscordac_unixexports.src b/src/dlls/mscordac/mscordac_unixexports.src index f2134974ef..aa0b541bd2 100644 --- a/src/dlls/mscordac/mscordac_unixexports.src +++ b/src/dlls/mscordac/mscordac_unixexports.src @@ -49,9 +49,11 @@ PAL_wcsstr _wcsicmp _stricmp -_snprintf -_snwprintf -_vsnwprintf +sprintf_s +swprintf_s +_snwprintf_s +_vsnprintf_s +_vsnwprintf_s _itow_s _i64tow_s memcpy_s @@ -171,4 +173,4 @@ _ZN25NativeExceptionHolderBase4PushEv _ZN25NativeExceptionHolderBaseC2Ev _ZN25NativeExceptionHolderBaseD2Ev _ZN28CatchHardwareExceptionHolderC1Ev -_ZN28CatchHardwareExceptionHolderD1Ev
\ No newline at end of file +_ZN28CatchHardwareExceptionHolderD1Ev |