Skip to content

Commit

Permalink
Merge pull request #10219 from akallabeth/cleanups
Browse files Browse the repository at this point in the history
Cleanups
  • Loading branch information
akallabeth committed May 25, 2024
2 parents 6228583 + 3261598 commit f7db004
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/SDL/common/res/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions client/SDL/common/res/sdl_resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 2 additions & 0 deletions client/SDL/common/res/sdl_resource_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
6 changes: 6 additions & 0 deletions libfreerdp/codec/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions libfreerdp/crypto/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f7db004

Please sign in to comment.