From ab0ea829ac4693404d39b5b9ee082de0e36a9d05 Mon Sep 17 00:00:00 2001 From: Craig Tiller <craig.tiller@gmail.com> Date: Sat, 12 Dec 2015 18:53:08 -0800 Subject: [PATCH] ASAN, Sanity fixes --- test/core/httpcli/parser_test.c | 3 ++- .../badreq_bad_client_test/badreq_bad_client_test.vcxproj | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/core/httpcli/parser_test.c b/test/core/httpcli/parser_test.c index b96814dd41..f3f17e157f 100644 --- a/test/core/httpcli/parser_test.c +++ b/test/core/httpcli/parser_test.c @@ -159,7 +159,8 @@ int main(int argc, char **argv) { "hello world!"); tmp1 = gpr_malloc(2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH); - memset(tmp1, 'a', 2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH); + memset(tmp1, 'a', 2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH - 1); + tmp1[2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH] = 0; gpr_asprintf(&tmp2, "HTTP/1.0 200 OK\r\nxyz: %s\r\n\r\n", tmp1); test_fails(split_modes[i], tmp2); gpr_free(tmp1); diff --git a/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj b/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj index 8e9314164a..d3cf3e3a38 100644 --- a/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj +++ b/vsprojects/vcxproj/test/badreq_bad_client_test/badreq_bad_client_test.vcxproj @@ -32,6 +32,9 @@ <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> + <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> @@ -71,7 +74,7 @@ <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <TreatWarningAsError>true</TreatWarningAsError> @@ -107,7 +110,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <TreatWarningAsError>true</TreatWarningAsError> -- GitLab