[PATCH 0/1] MR422: riched20: Ensure MEPF_COMPLEX is unset when in password input mode. (#53335)
This is required to keep `riched20:richole test_clipboard()` from crashing once `ITextDocument::Undo` is implemented. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/422
From: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Otherwise, Wine may crash while attempting to fetch the script shaping information, which does not exist since shape_para() was not called. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53335 Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com> --- dlls/riched20/wrap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index db3e2806239..3505d0724d1 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -835,6 +835,15 @@ static void ME_WrapTextParagraph( ME_TextEditor *editor, ME_Context *c, ME_Parag if (SUCCEEDED( itemize_para( c, para ) )) shape_para( c, para ); } + else + { + /* If the user has just converted a normal rich editor with already + * existing text into a password input, the text may contain paragraphs + * with MEPF_COMPLEX set. Since we don't really shape any paragraphs + * here, we need to ensure the the MEPF_COMPLEX flag is unset. + */ + para->nFlags &= ~MEPF_COMPLEX; + } wc.context = c; wc.para = para; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/422
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/422
Jinoh Kang (@iamahuman) commented about dlls/riched20/wrap.c:
if (SUCCEEDED( itemize_para( c, para ) )) shape_para( c, para ); } + else + { + /* If the user has just converted a normal rich editor with already + * existing text into a password input, the text may contain paragraphs + * with MEPF_COMPLEX set. Since we don't really shape any paragraphs + * here, we need to ensure the the MEPF_COMPLEX flag is unset.
Typo: the the -> that the ```suggestion:-0+0 * here, we need to ensure that the MEPF_COMPLEX flag is unset. ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/422#note_3938
participants (3)
-
Huw Davies (@huw) -
Jinoh Kang -
Jinoh Kang (@iamahuman)