Merge pull request #10219 from akallabeth/cleanups

Cleanups
This commit is contained in:
akallabeth 2024-05-25 09:31:40 +02:00 committed by GitHub
commit f7db004a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 2 deletions

View File

@ -79,7 +79,7 @@ if (SDL_USE_COMPILED_RESOURCES)
if (WITH_SDL_IMAGE_DIALOGS)
foreach(FILE ${RES_SVG_FILES})
convert_to_bin("${FILE}" "images")
convert_to_bin("${FILE}" "images")
endforeach()
endif()
@ -125,7 +125,7 @@ endif()
add_library(sdl-common-client-res STATIC
${RES_FILES}
${SRCS}
${FACTORY_HDR}
${FACTORY_HDR}
${FACTORY_SRCS}
)
set_property(TARGET sdl-common-client-res PROPERTY POSITION_INDEPENDENT_CODE ON)

View File

@ -93,7 +93,9 @@ std::map<std::string, std::vector<unsigned char>>& SDLResourceManager::resources
{
static std::map<std::string, std::vector<unsigned char>> resources = {};
#if defined(SDL_USE_COMPILED_RESOURCES)
if (resources.empty())
init();
#endif
return resources;
}

View File

@ -47,5 +47,7 @@ class SDLResourceManager
private:
static std::map<std::string, std::vector<unsigned char>>& resources();
#if defined(SDL_USE_COMPILED_RESOURCES)
static void init(); // implemented in generated file
#endif
};

View File

@ -593,6 +593,9 @@ BOOL freerdp_image_copy_no_overlap(BYTE* WINPR_RESTRICT pDstData, DWORD DstForma
SSIZE_T dstVOffset = 0;
SSIZE_T dstVMultiplier = 1;
if ((nWidth == 0) || (nHeight == 0))
return TRUE;
if ((nHeight > INT32_MAX) || (nWidth > INT32_MAX))
return FALSE;
@ -711,6 +714,9 @@ BOOL freerdp_image_copy_overlap(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep
SSIZE_T dstVOffset = 0;
SSIZE_T dstVMultiplier = 1;
if ((nWidth == 0) || (nHeight == 0))
return TRUE;
if ((nHeight > INT32_MAX) || (nWidth > INT32_MAX))
return FALSE;

View File

@ -902,6 +902,7 @@ static int bio_err_print(const char* str, size_t len, void* u)
{
wLog* log = u;
WLog_Print(log, WLOG_ERROR, "[BIO_do_handshake] %s [%" PRIuz "]", str, len);
return 0;
}
TlsHandshakeResult freerdp_tls_handshake(rdpTls* tls)