Commit 5cbe3a6c authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

riched20: Don't write past end of buffer.

parent 015aae30
...@@ -4309,7 +4309,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, ...@@ -4309,7 +4309,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
str = get_text( run, 0 ); str = get_text( run, 0 );
} }
/* append '\r' to the last paragraph. */ /* append '\r' to the last paragraph. */
if (run == para_end_run( para_prev( editor_end_para( editor ) ) ) && bEOP) if (run == para_end_run( para_prev( editor_end_para( editor ) ) ) && bEOP && buflen)
{ {
*buffer = '\r'; *buffer = '\r';
buffer ++; buffer ++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment