[PATCH 0/1] MR9790: riched20: Don't crash on WM_COPY without selection.
Note: actual crash happens within ME_StreamOutRTF, which do/while loop expects a non-zero length to be used. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59005 Signed-off-by: Eric Pouech <epouech@codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9790
From: Eric Pouech <epouech@codeweavers.com> Note: actual crash happens within ME_StreamOutRTF, which do/while loop expects a non-zero length to be used. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59005 Signed-off-by: Eric Pouech <epouech@codeweavers.com> --- dlls/riched20/editor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 1a0c444579b..d655c1f8598 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2381,6 +2381,7 @@ static BOOL copy_or_cut( ME_TextEditor *editor, BOOL cut ) if (editor->password_char) return FALSE; count -= offs; + if (!count) return FALSE; hr = editor_copy_or_cut( editor, cut, sel_start, count, NULL ); if (FAILED( hr )) editor_beep( editor, MB_ICONERROR ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9790
participants (2)
-
Eric Pouech -
eric pouech (@epo)