From 546908ebeb363274cfae0ef1413a34e54f3a5d00 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 24 Feb 2026 08:55:06 +0100 Subject: [PATCH 1/3] [utils,signal] fix missing function declaration --- libfreerdp/utils/signal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libfreerdp/utils/signal.c b/libfreerdp/utils/signal.c index 90cb34f9a..47054547d 100644 --- a/libfreerdp/utils/signal.c +++ b/libfreerdp/utils/signal.c @@ -31,6 +31,10 @@ #define TAG FREERDP_TAG("utils.signal") +#if defined(_WIN32) +const char* strsignal(int signum); +#endif + BOOL fsig_handlers_registered = FALSE; typedef struct From f06c066f0a3e16bea077f9928d2e4fd5b85e21b0 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 24 Feb 2026 08:53:01 +0100 Subject: [PATCH 2/3] [channels,printer] fix missing includes and format string --- channels/printer/client/win/printer_win.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/channels/printer/client/win/printer_win.c b/channels/printer/client/win/printer_win.c index 7abc55e6f..b764793b3 100644 --- a/channels/printer/client/win/printer_win.c +++ b/channels/printer/client/win/printer_win.c @@ -34,6 +34,7 @@ #include #include +#include #define WIDEN_INT(x) L##x #define WIDEN(x) WIDEN_INT(x) @@ -75,7 +76,7 @@ typedef struct WINPR_ATTR_MALLOC(free, 1) static WCHAR* printer_win_get_printjob_name(size_t id) { - struct tm tres; + struct tm tres = { 0 }; WCHAR* str = NULL; size_t len = 0; @@ -93,7 +94,7 @@ static WCHAR* printer_win_get_printjob_name(size_t id) const int rc = swprintf_s( str, len, - WIDEN("%s Print %04d-%02d-%02d% 02d-%02d-%02d - Job %") WIDEN(PRIuz) WIDEN("\0"), + WIDEN("%s Print %04d-%02d-%02d %02d-%02d-%02d - Job %") WIDEN(PRIuz) WIDEN("\0"), freerdp_getApplicationDetailsStringW(), tres.tm_year + 1900, tres.tm_mon + 1, tres.tm_mday, tres.tm_hour, tres.tm_min, tres.tm_sec, id); if (rc <= 0) From 7c0a0c903b407aa4140d5bdb4954fe623b7bc9ac Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 24 Feb 2026 09:02:39 +0100 Subject: [PATCH 3/3] [winpr,crypto] use size_t as length for md[45] --- winpr/libwinpr/crypto/md4.c | 14 +++++++------- winpr/libwinpr/crypto/md4.h | 2 +- winpr/libwinpr/crypto/md5.c | 14 +++++++------- winpr/libwinpr/crypto/md5.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/winpr/libwinpr/crypto/md4.c b/winpr/libwinpr/crypto/md4.c index 78ceb8cbe..17b970b74 100644 --- a/winpr/libwinpr/crypto/md4.c +++ b/winpr/libwinpr/crypto/md4.c @@ -96,7 +96,7 @@ static inline winpr_MD4_u32plus H(winpr_MD4_u32plus x, winpr_MD4_u32plus y, winp * This processes one or more 64-byte data blocks, but does NOT update the bit * counters. There are no alignment requirements. */ -static const void* body(WINPR_MD4_CTX* ctx, const void* data, unsigned long size) +static const void* body(WINPR_MD4_CTX* ctx, const void* data, size_t size) { const winpr_MD4_u32plus ac1 = 0x5a827999; const winpr_MD4_u32plus ac2 = 0x6ed9eba1; @@ -196,18 +196,18 @@ void winpr_MD4_Init(WINPR_MD4_CTX* ctx) ctx->hi = 0; } -void winpr_MD4_Update(WINPR_MD4_CTX* ctx, const void* data, unsigned long size) +void winpr_MD4_Update(WINPR_MD4_CTX* ctx, const void* data, size_t size) { winpr_MD4_u32plus saved_lo = ctx->lo; if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) ctx->hi++; ctx->hi += size >> 29; - unsigned long used = saved_lo & 0x3f; + size_t used = saved_lo & 0x3f; if (used) { - unsigned long available = 64 - used; + size_t available = 64 - used; if (size < available) { @@ -223,7 +223,7 @@ void winpr_MD4_Update(WINPR_MD4_CTX* ctx, const void* data, unsigned long size) if (size >= 64) { - data = body(ctx, data, size & ~(unsigned long)0x3f); + data = body(ctx, data, size & ~(size_t)0x3f); size &= 0x3f; } @@ -240,11 +240,11 @@ static inline void mdOUT(unsigned char* dst, winpr_MD4_u32plus src) void winpr_MD4_Final(unsigned char* result, WINPR_MD4_CTX* ctx) { - unsigned long used = ctx->lo & 0x3f; + size_t used = ctx->lo & 0x3f; ctx->buffer[used++] = 0x80; - unsigned long available = 64 - used; + size_t available = 64 - used; if (available < 8) { diff --git a/winpr/libwinpr/crypto/md4.h b/winpr/libwinpr/crypto/md4.h index 1ea008ecc..87c7760b0 100644 --- a/winpr/libwinpr/crypto/md4.h +++ b/winpr/libwinpr/crypto/md4.h @@ -40,7 +40,7 @@ typedef struct } WINPR_MD4_CTX; extern void winpr_MD4_Init(WINPR_MD4_CTX* ctx); -extern void winpr_MD4_Update(WINPR_MD4_CTX* ctx, const void* data, unsigned long size); +extern void winpr_MD4_Update(WINPR_MD4_CTX* ctx, const void* data, size_t size); extern void winpr_MD4_Final(unsigned char* result, WINPR_MD4_CTX* ctx); #endif diff --git a/winpr/libwinpr/crypto/md5.c b/winpr/libwinpr/crypto/md5.c index c832e7005..6613e9b6d 100644 --- a/winpr/libwinpr/crypto/md5.c +++ b/winpr/libwinpr/crypto/md5.c @@ -106,7 +106,7 @@ static inline winpr_MD5_u32plus I(winpr_MD5_u32plus x, winpr_MD5_u32plus y, winp * This processes one or more 64-byte data blocks, but does NOT update the bit * counters. There are no alignment requirements. */ -static const void* body(WINPR_MD5_CTX* ctx, const void* data, unsigned long size) +static const void* body(WINPR_MD5_CTX* ctx, const void* data, size_t size) { const unsigned char* ptr = (const unsigned char*)data; @@ -221,18 +221,18 @@ void winpr_MD5_Init(WINPR_MD5_CTX* ctx) ctx->hi = 0; } -void winpr_MD5_Update(WINPR_MD5_CTX* ctx, const void* data, unsigned long size) +void winpr_MD5_Update(WINPR_MD5_CTX* ctx, const void* data, size_t size) { winpr_MD5_u32plus saved_lo = ctx->lo; if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) ctx->hi++; ctx->hi += size >> 29; - unsigned long used = saved_lo & 0x3f; + size_t used = saved_lo & 0x3f; if (used) { - unsigned long available = 64 - used; + size_t available = 64 - used; if (size < available) { @@ -248,7 +248,7 @@ void winpr_MD5_Update(WINPR_MD5_CTX* ctx, const void* data, unsigned long size) if (size >= 64) { - data = body(ctx, data, size & ~(unsigned long)0x3f); + data = body(ctx, data, size & ~(size_t)0x3f); size &= 0x3f; } @@ -265,11 +265,11 @@ static inline void mdOUT(unsigned char* dst, winpr_MD5_u32plus src) void winpr_MD5_Final(unsigned char* result, WINPR_MD5_CTX* ctx) { - unsigned long used = ctx->lo & 0x3f; + size_t used = ctx->lo & 0x3f; ctx->buffer[used++] = 0x80; - unsigned long available = 64 - used; + size_t available = 64 - used; if (available < 8) { diff --git a/winpr/libwinpr/crypto/md5.h b/winpr/libwinpr/crypto/md5.h index 2056b9a80..a05d0aad0 100644 --- a/winpr/libwinpr/crypto/md5.h +++ b/winpr/libwinpr/crypto/md5.h @@ -42,7 +42,7 @@ typedef struct } WINPR_MD5_CTX; extern void winpr_MD5_Init(WINPR_MD5_CTX* ctx); -extern void winpr_MD5_Update(WINPR_MD5_CTX* ctx, const void* data, unsigned long size); +extern void winpr_MD5_Update(WINPR_MD5_CTX* ctx, const void* data, size_t size); extern void winpr_MD5_Final(unsigned char* result, WINPR_MD5_CTX* ctx); #endif