Module: wine
Branch: master
Commit: f77f12ba3b1dad9ebdcb116c66b137e9103a0d1b
URL: https://gitlab.winehq.org/wine/wine/-/commit/f77f12ba3b1dad9ebdcb116c66b137…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
Date: Tue Jul 12 02:28:15 2022 +0900
riched20: Ensure MEPF_COMPLEX is unset when in password input mode.
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..8cfb1692ecd 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 that the MEPF_COMPLEX flag is unset.
+ */
+ para->nFlags &= ~MEPF_COMPLEX;
+ }
wc.context = c;
wc.para = para;
Module: wine
Branch: master
Commit: 87e2b007744f8bafdea63df21a74ffc24b392912
URL: https://gitlab.winehq.org/wine/wine/-/commit/87e2b007744f8bafdea63df21a74ff…
Author: Eric Pouech <eric.pouech(a)gmail.com>
Date: Tue Jul 12 09:28:57 2022 +0200
dbghelp: Don't include global & static variables from S_LOCAL* records.
PDB supports description of a global or static variable:
- accessed from a register
- stored as a local variable record inside a function
This likely describes access to a global/static variable where
intermediate computation is kept in a register.
We cannot store this kind of entries in local variable lists
(builtin dbghelp and winedbg are not prepared to handle a global variable)
Note: the global or static Codeview data record is still present (with a
relocatable address), so the variable should still be available from global
access (but could be not up-to-date if temporarly stored in a register).
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/dbghelp/msc.c | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index e34853b45e8..bec9dec2532 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -1821,6 +1821,17 @@ static void codeview_xform_range(const struct msc_debug_info* msc_dbg,
locinfo->rangelen = adrange->cbRange;
}
+static unsigned codeview_defrange_length(const union codeview_symbol* sym)
+{
+ const union codeview_symbol* first_symrange = get_next_sym(sym);
+ const union codeview_symbol* symrange;
+
+ for (symrange = first_symrange;
+ symrange->generic.id >= S_DEFRANGE && symrange->generic.id <= S_DEFRANGE_REGISTER_REL;
+ symrange = get_next_sym(symrange)) {}
+ return (const char*)symrange - (const char*)first_symrange;
+}
+
static unsigned codeview_transform_defrange(const struct msc_debug_info* msc_dbg,
struct symt_function* curr_func,
const union codeview_symbol* sym,
@@ -2567,12 +2578,21 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
}
break;
case S_LOCAL:
- length += codeview_transform_defrange(msc_dbg, curr_func, sym, &loc);
- symt_add_func_local(msc_dbg->module, curr_func,
- sym->local_v3.varflags.is_param ? DataIsParam : DataIsLocal,
- &loc, block,
- codeview_get_type(sym->local_v3.symtype, FALSE),
- sym->local_v3.name);
+ /* FIXME: don't store global/static variables accessed through registers... we don't support that
+ * in locals... anyway, global data record should be present as well (so variable will be avaible
+ * through global defintion, but potentially not updated)
+ */
+ if (!sym->local_v3.varflags.enreg_global && !sym->local_v3.varflags.enreg_static)
+ {
+ length += codeview_transform_defrange(msc_dbg, curr_func, sym, &loc);
+ symt_add_func_local(msc_dbg->module, curr_func,
+ sym->local_v3.varflags.is_param ? DataIsParam : DataIsLocal,
+ &loc, block,
+ codeview_get_type(sym->local_v3.symtype, FALSE),
+ sym->local_v3.name);
+ }
+ else
+ length += codeview_defrange_length(sym);
break;
case S_INLINESITE:
{