summaryrefslogtreecommitdiff
path: root/src/md
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2016-12-23 14:41:28 +0100
committerJan Kotas <jkotas@microsoft.com>2016-12-23 05:41:28 -0800
commitf5cbe4c9cab2873b60cd3c991732a250d2e164a2 (patch)
tree3dfef3ef56990e19fb914821ed4e6f36c9931fd1 /src/md
parent5ef3df8ffe059d5f91c6bae09d8f95a0332f1363 (diff)
downloadcoreclr-f5cbe4c9cab2873b60cd3c991732a250d2e164a2.tar.gz
coreclr-f5cbe4c9cab2873b60cd3c991732a250d2e164a2.tar.bz2
coreclr-f5cbe4c9cab2873b60cd3c991732a250d2e164a2.zip
Remove all usage of vsnprintf (#8709)
This change removes all usages of vsnprintf and modifies runtime to not to use vsnprintf or _vsnprintf I've also fixed two issues in PAL TRACE function string format parameters that caused crashes when I was trying to run all PAL tests with PAL tracing enabled.
Diffstat (limited to 'src/md')
-rw-r--r--src/md/compiler/regmeta.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/md/compiler/regmeta.cpp b/src/md/compiler/regmeta.cpp
index 230d1e4ff0..feb1cdd31b 100644
--- a/src/md/compiler/regmeta.cpp
+++ b/src/md/compiler/regmeta.cpp
@@ -829,7 +829,10 @@ int DumpMD_VWriteMarker(__in __in_z const char *str, va_list marker)
{
if (FAILED(hr = m_output.ReSizeNoThrow(STRING_BUFFER_LEN * i)))
return 0;
- count = _vsnprintf((char *)m_output.Ptr(), STRING_BUFFER_LEN * i, str, marker);
+ va_list markerCopy;
+ va_copy(markerCopy, marker);
+ count = _vsnprintf_s((char *)m_output.Ptr(), STRING_BUFFER_LEN * i, _TRUNCATE, str, markerCopy);
+ va_end(markerCopy);
i *= 2;
}
OutputDebugStringA((LPCSTR)m_output.Ptr());