From aee66ef47117800ab23add607fda27b53658e7d8 Mon Sep 17 00:00:00 2001 From: malaguenha Date: Sat, 13 May 2023 15:02:56 +0900 Subject: [PATCH] Commit to solve the issue #11353, IME, Windows - buffer overrun? when entering long composition string --- src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs b/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs index 7510b48270..0fdc103d3a 100644 --- a/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs +++ b/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs @@ -1902,7 +1902,7 @@ namespace Avalonia.Win32.Interop if (bufferLength > 0) { - var buffer = bufferLength <= 64 ? stackalloc byte[bufferLength] : new byte[bufferLength]; + var buffer = bufferLength <= 64 ? stackalloc byte[bufferLength + 8] : new byte[bufferLength]; fixed (byte* bufferPtr = buffer) {