From 788f38b4281f080216495cc6f353c868e9986b0c Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 17 Jun 2023 01:07:07 +0200 Subject: [PATCH] Adjust cURL compile options - Disable function inlining entirely, this allows for much easier hooking between engine and SDK code (the compiled code is now identical between engine and SDK, except that the SDK has all relevant security problems patched as per https://curl.se/docs/vuln-7.54.0.html). - Enable buffer security checks to avoid potential remote attacks. --- r5dev/thirdparty/curl/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/r5dev/thirdparty/curl/CMakeLists.txt b/r5dev/thirdparty/curl/CMakeLists.txt index 1032599f..88382946 100644 --- a/r5dev/thirdparty/curl/CMakeLists.txt +++ b/r5dev/thirdparty/curl/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required( VERSION 3.16 ) -add_module( "lib" "libcurl" "" ${FOLDER_CONTEXT} TRUE TRUE ) +add_module( "lib" "libcurl" "" ${FOLDER_CONTEXT} TRUE FALSE ) start_sources() @@ -279,6 +279,11 @@ target_compile_definitions( ${PROJECT_NAME} PRIVATE ENABLE_IPV6 ) +target_compile_options( ${PROJECT_NAME} PRIVATE + $<$,$>:/Ob0> + $<$,$>:/GS> +) + target_include_directories( ${PROJECT_NAME} PRIVATE "${ENGINE_SOURCE_DIR}/thirdparty/curl/" "${ENGINE_SOURCE_DIR}/thirdparty/curl/include/"