From 9a7432d23cb73598744ee1844e04fbddd88ba01f Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sun, 5 Mar 2023 20:57:36 +0100 Subject: [PATCH] [winpr,stream] log Stream_Read_UTF16_String failures --- winpr/libwinpr/utils/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winpr/libwinpr/utils/stream.c b/winpr/libwinpr/utils/stream.c index 0dcc9fe20..a87bd6322 100644 --- a/winpr/libwinpr/utils/stream.c +++ b/winpr/libwinpr/utils/stream.c @@ -306,7 +306,7 @@ BOOL Stream_Read_UTF16_String(wStream* s, WCHAR* dst, size_t length) WINPR_ASSERT(s); WINPR_ASSERT(dst); - if (Stream_GetRemainingLength(s) / sizeof(WCHAR) < length) + if (!Stream_CheckAndLogRequiredLengthOfSizeWLog(STREAM_TAG, s, length, sizeof(WCHAR))) return FALSE; for (x = 0; x < length; x++)