Module: wine
Branch: master
Commit: 0e9d221582da5e7ee1b8c7a549b05a8007cb5f56
URL: https://gitlab.winehq.org/wine/wine/-/commit/0e9d221582da5e7ee1b8c7a549b05a…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Date: Wed Jun 21 17:58:00 2023 +0300
jscript: Get rid of jsobj in scope_chain_t.
It was confusing and aliased to obj when it was a jsdisp (and shared ref), but
we can obtain that already with helpers as needed (as_jsdisp and to_jsdisp),
no reason to keep it so confusing and a separate field.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/jscript/engine.c | 57 +++++++++++++++++++++++++------------------------
dlls/jscript/engine.h | 1 -
dlls/jscript/function.c | 11 +++++-----
3 files changed, 35 insertions(+), 34 deletions(-)
Module: wine
Branch: master
Commit: 2173cac68e668eea3d28c30e9fc11ea8ee13fa51
URL: https://gitlab.winehq.org/wine/wine/-/commit/2173cac68e668eea3d28c30e9fc11e…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Date: Wed Jun 21 17:58:00 2023 +0300
jscript: Fix addressing invalid memory if ref is an argument.
`ref` can be negative in case it refers to an argument. Even though scope !=
frame->base_scope would rule this out (because only base scopes have args),
it was checked *after* the memory access, which would read out of bounds
memory first. This didn't appear as an issue in practice since it's using the
heap pool, so there's probably valid memory before it, but it's still wrong.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/jscript/engine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 9e375294cb5..a4b416ba8ed 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -657,7 +657,7 @@ static HRESULT detach_scope(script_ctx_t *ctx, call_frame_t *frame, scope_chain_
if (FAILED(hres = jsdisp_propput_name(scope->jsobj, name, ctx->stack[local_off(frame, ref)])))
return hres;
- if (frame->function->variables[ref].func_id != -1 && scope != frame->base_scope
+ if (scope != frame->base_scope && frame->function->variables[ref].func_id != -1
&& FAILED(hres = jsdisp_propput_name(frame->variable_obj, name, ctx->stack[local_off(frame, ref)])))
return hres;
}
Module: wine
Branch: master
Commit: 0911d462f977aef1071b59b70cfa68398f13663b
URL: https://gitlab.winehq.org/wine/wine/-/commit/0911d462f977aef1071b59b70cfa68…
Author: Liam Middlebrook <lmiddlebrook(a)nvidia.com>
Date: Tue Jun 20 10:33:56 2023 -0700
cmd: Fix empty strings between PATH separators.
Previously if an empty string was encountered while parsing out PATH,
cmd.exe would ignore the rest of the PATH entirely.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55097
Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com>
---
programs/cmd/wcmdmain.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 022ff6637c5..de6e721b26a 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1135,6 +1135,12 @@ void WCMD_run_program (WCHAR *command, BOOL called)
else
lstrcpyW(temp, thisDir + 1);
+ /* When temp is an empty string, skip over it. This needs
+ to be done before the expansion, because WCMD_get_fullpath
+ fails when given an empty string */
+ if (*temp == '\0')
+ continue;
+
/* Since you can have eg. ..\.. on the path, need to expand
to full information */
if (!WCMD_get_fullpath(temp, ARRAY_SIZE(thisDir), thisDir, NULL)) return;