From 64b42be79e544ced18280c01f9b0c56610ceda8d Mon Sep 17 00:00:00 2001 From: David Fort Date: Tue, 19 Mar 2024 10:01:45 +0100 Subject: [PATCH] [win32,chilsession] fix path computation in 32 bits The path was not adjusted correctly (wrong WCHAR pointer computation). --- libfreerdp/core/childsession.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfreerdp/core/childsession.c b/libfreerdp/core/childsession.c index 823326f4f..f9d5b2c03 100644 --- a/libfreerdp/core/childsession.c +++ b/libfreerdp/core/childsession.c @@ -491,13 +491,13 @@ static BOOL createChildSessionTransport(HANDLE* pFile) * so add it if it's not there */ size_t len = _wcslen(pipePath); - if (len > 0x80 - (8 + 1)) + if (len > 0x80 - (4 + 1)) { WLog_ERR(TAG, "pipePath is too long to be adjusted"); goto out; } - memmove(pipePath + 8, pipePath, (len + 1) * sizeof(WCHAR)); + memmove(pipePath + 4, pipePath, (len + 1) * sizeof(WCHAR)); memcpy(pipePath, startOfPath, 8); }