Skip to content
Snippets Groups Projects
Commit 5cbe3a6c authored by eric pouech's avatar eric pouech Committed by Alexandre Julliard
Browse files

riched20: Don't write past end of buffer.

parent 015aae30
No related branches found
No related tags found
No related merge requests found
......@@ -4309,7 +4309,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
str = get_text( run, 0 );
}
/* 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 ++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment