Module: wine
Branch: master
Commit: 567be5b60ee6c165828f6a43b252299b5f9f6dcc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=567be5b60ee6c165828f6a43…
Author: Zebediah Figura <z.figura12(a)gmail.com>
Date: Thu Jul 5 00:43:24 2018 +0200
strmbase: Update comment for copying pin info.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/strmbase/pin.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index ef22a57..a100ae1 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -145,10 +145,7 @@ out:
static void Copy_PinInfo(PIN_INFO * pDest, const PIN_INFO * pSrc)
{
- /* Tempting to just do a memcpy, but the name field is
- 128 characters long! We will probably never exceed 10
- most of the time, so we are better off copying
- each field manually */
+ /* avoid copying uninitialized data */
strcpyW(pDest->achName, pSrc->achName);
pDest->dir = pSrc->dir;
pDest->pFilter = pSrc->pFilter;
Module: wine
Branch: master
Commit: ab46a89c3b8649844a70ee30abffbbd275128bc3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ab46a89c3b8649844a70ee30…
Author: Jason Edmeades <us(a)edmeades.me.uk>
Date: Wed Jul 4 22:08:40 2018 +0100
cmd: Fix issue in WCMD_assoc highlighted by valgrind.
In an error condition, the wrong variable was being used for an insert,
resulting in a read from uninitialized data. This could be triggered for
example by 'ftype jason=', and the error message should have included
jason but instead was just ''.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38849
Signed-off-by: Jason Edmeades <us(a)edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
programs/cmd/builtins.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 3a0981d..57a41c4 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -4923,7 +4923,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
LoadStringW(hinst, WCMD_NOFTYPE, msgbuffer,
sizeof(msgbuffer)/sizeof(WCHAR));
}
- WCMD_output_stderr(msgbuffer, keyValue);
+ WCMD_output_stderr(msgbuffer, args);
errorlevel = 2;
}
Module: wine
Branch: master
Commit: 254dc78c2cc5aec26b8af6956c3525c1880bf570
URL: https://source.winehq.org/git/wine.git/?a=commit;h=254dc78c2cc5aec26b8af695…
Author: Jason Edmeades <us(a)edmeades.me.uk>
Date: Wed Jul 4 22:08:39 2018 +0100
cmd: Call and goto finds the next matching label.
A call or a goto will find the next matching label not the first one in the
file. This means it could be later in the file or it could be earlier in the
file, so make goto (which 'call' also uses) first scan from current file
position to the end of the file, and subsequently from the start of the file
to the wrap point.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42823
Signed-off-by: Jason Edmeades <us(a)edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
programs/cmd/builtins.c | 67 +++++++++++++++++++++++---------
programs/cmd/tests/test_builtins.cmd | 51 ++++++++++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 13 +++++++
3 files changed, 113 insertions(+), 18 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 35b68bd..3a0981d 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -2582,30 +2582,61 @@ void WCMD_goto (CMD_LIST **cmdList) {
if (labelend) *labelend = 0x00;
WINE_TRACE("goto label: '%s'\n", wine_dbgstr_w(paramStart));
- SetFilePointer (context -> h, 0, NULL, FILE_BEGIN);
- while (*paramStart &&
- WCMD_fgets (string, sizeof(string)/sizeof(WCHAR), context -> h)) {
- str = string;
+ /* Loop through potentially twice - once from current file position
+ through to the end, and second time from start to current file
+ position */
+ if (*paramStart) {
+ int loop;
+ LARGE_INTEGER startli;
+ for (loop=0; loop<2; loop++) {
+ if (loop==0) {
+ /* On first loop, save the file size */
+ startli.QuadPart = 0;
+ startli.u.LowPart = SetFilePointer(context -> h, startli.u.LowPart,
+ &startli.u.HighPart, FILE_CURRENT);
+ } else {
+ /* On second loop, start at the beginning of the file */
+ WINE_TRACE("Label not found, trying from beginning of file\n");
+ if (loop==1) SetFilePointer (context -> h, 0, NULL, FILE_BEGIN);
+ }
- /* Ignore leading whitespace or no-echo character */
- while (*str=='@' || isspaceW (*str)) str++;
+ while (WCMD_fgets (string, sizeof(string)/sizeof(WCHAR), context -> h)) {
+ str = string;
- /* If the first real character is a : then this is a label */
- if (*str == ':') {
- str++;
+ /* Ignore leading whitespace or no-echo character */
+ while (*str=='@' || isspaceW (*str)) str++;
- /* Skip spaces between : and label */
- while (isspaceW (*str)) str++;
- WINE_TRACE("str before brk %s\n", wine_dbgstr_w(str));
+ /* If the first real character is a : then this is a label */
+ if (*str == ':') {
+ str++;
- /* Label ends at whitespace or redirection characters */
- labelend = strpbrkW(str, labelEndsW);
- if (labelend) *labelend = 0x00;
- WINE_TRACE("comparing found label %s\n", wine_dbgstr_w(str));
+ /* Skip spaces between : and label */
+ while (isspaceW (*str)) str++;
+ WINE_TRACE("str before brk %s\n", wine_dbgstr_w(str));
- if (lstrcmpiW (str, paramStart) == 0) return;
- }
+ /* Label ends at whitespace or redirection characters */
+ labelend = strpbrkW(str, labelEndsW);
+ if (labelend) *labelend = 0x00;
+ WINE_TRACE("comparing found label %s\n", wine_dbgstr_w(str));
+
+ if (lstrcmpiW (str, paramStart) == 0) return;
+ }
+
+ /* See if we have gone beyond the end point if second time through */
+ if (loop==1) {
+ LARGE_INTEGER curli;
+ curli.QuadPart = 0;
+ curli.u.LowPart = SetFilePointer(context -> h, curli.u.LowPart,
+ &curli.u.HighPart, FILE_CURRENT);
+ if (curli.QuadPart > startli.QuadPart) {
+ WINE_TRACE("Reached wrap point, label not found\n");
+ break;
+ }
+ }
+ }
+ }
}
+
WCMD_output_stderr(WCMD_LoadMessage(WCMD_NOTARGET));
context -> skip_rest = TRUE;
}
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 49c2d9e..0a8122c 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -3027,6 +3027,57 @@ echo FAILURE at dest 10
:dest10:this is also ignored
echo Correctly ignored trailing information
+rem Testing which label is reached when there are many options
+echo Begin:
+set nextlabel=
+call :sub
+set nextlabel=middle
+goto :sub
+
+:sub
+echo ..First sub
+if not "%nextlabel%"=="" goto :%nextlabel%
+goto :EOF
+
+:sub
+echo ..Second sub
+if not "%nextlabel%"=="" goto :%nextlabel%
+goto :EOF
+
+:middle
+echo Middle:
+set nextlabel=
+call :sub
+set nextlabel=nearend
+goto :sub
+
+:sub
+echo ..Third sub
+if not "%nextlabel%"=="" goto :%nextlabel%
+goto :EOF
+
+:nearend
+echo Near end:
+set nextlabel=
+call :sub
+set nextlabel=end
+goto :sub
+
+:sub
+echo ..Fourth sub
+if not "%nextlabel%"=="" goto :%nextlabel%
+goto :EOF
+
+:end
+echo At end:
+set nextlabel=
+call :sub
+set nextlabel=done
+goto :sub
+
+:done
+echo Finished
+
echo ------------ Testing PATH ------------
set WINE_backup_path=%path%
set path=original
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index cfde83b..7f4f724 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -1582,6 +1582,19 @@ goto with redirections worked
Ignoring double colons worked
label with mixed whitespace and no echo worked
Correctly ignored trailing information
+Begin:
+..First sub
+..First sub
+Middle:
+..Third sub
+..Third sub
+Near end:
+..Fourth sub
+..Fourth sub
+At end:
+..First sub
+..First sub
+Finished
------------ Testing PATH ------------
PATH=original
PATH=try2
Module: wine
Branch: master
Commit: daee8b753c52011d1dd745e399cbe25ac9e9ac47
URL: https://source.winehq.org/git/wine.git/?a=commit;h=daee8b753c52011d1dd745e3…
Author: Jason Edmeades <us(a)edmeades.me.uk>
Date: Wed Jul 4 22:08:38 2018 +0100
cmd: Support "c:<space>" etc when changing drive letters.
This allows whitespace and any other text on the line when changing drive letters.
Mostly I expect it crops up when commands are concatenated and the readability
whitespace is added to the end of the command. For example C: & dir results in
"C: " and "dir" as the two commands. We cannot unconditionally remove whitespace
as some commands rely on it.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40694
Signed-off-by: Jason Edmeades <us(a)edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
programs/cmd/tests/test_builtins.cmd | 35 ++++++++++++++++++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 7 +++++++
programs/cmd/wcmdmain.c | 9 ++++++--
3 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 6f2ef4a..49c2d9e 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -3042,6 +3042,41 @@ echo ------------ Testing start /W ------------
echo start /W failed to wait>foobar.txt
start /W "" cmd /C "ping -n1 & echo start /W seems to really wait>foobar.txt"& type foobar.txt& del foobar.txt
+echo ------------ Testing changing the drive letter ----------
+pushd C:\
+
+echo Normal:
+call :setError 0
+C:
+if errorlevel 1 echo Normal drive change failed
+
+echo Normal+space
+call :setError 0
+C:@space@
+if errorlevel 1 echo Normal+space drive change failed
+
+echo Normal+space+garbage
+call :setError 0
+C: garbage
+if errorlevel 1 echo Normal+space+garbage drive change failed
+
+call :setError 0
+echo Quoted should fail
+"C:"
+if not errorlevel 1 echo quoted drive change unexpectedly worked
+
+echo Normal+tab
+call :setError 0
+C:@tab@
+if errorlevel 1 echo Normal+tab drive change failed
+
+echo Normal+tab+garbage
+call :setError 0
+C:@tab@garbagetab
+if errorlevel 1 echo Normal+tab+garbage drive change failed
+
+popd
+
echo ------------ Testing combined CALLs/GOTOs ------------
echo @echo off>foo.cmd
echo goto :eof>>foot.cmd
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 0eb5b96..cfde83b 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -1588,6 +1588,13 @@ PATH=try2
PATH=try3
------------ Testing start /W ------------
start /W seems to really wait
+------------ Testing changing the drive letter ----------
+Normal:
+Normal+space
+Normal+space+garbage
+Quoted should fail
+Normal+tab
+Normal+tab+garbage
------------ Testing combined CALLs/GOTOs ------------
world
cheball
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 827ddd2..0d02f1f 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1327,13 +1327,18 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
cmd = new_cmd;
/*
- * Changing default drive has to be handled as a special case.
+ * Changing default drive has to be handled as a special case, anything
+ * else if it exists after whitespace is ignored
*/
- if ((strlenW(cmd) == 2) && (cmd[1] == ':') && IsCharAlphaW(cmd[0])) {
+ if ((cmd[1] == ':') && IsCharAlphaW(cmd[0]) &&
+ (!cmd[2] || cmd[2] == ' ' || cmd[2] == '\t')) {
WCHAR envvar[5];
WCHAR dir[MAX_PATH];
+ /* Ignore potential garbage on the same line */
+ cmd[2]=0x00;
+
/* According to MSDN CreateProcess docs, special env vars record
the current directory on each drive, in the form =C:
so see if one specified, and if so go back to it */
Module: website
Branch: master
Commit: a766c9724eedfba2fee2ab28ae98749af2dc29f1
URL: https://source.winehq.org/git/website.git/?a=commit;h=a766c9724eedfba2fee2a…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Thu Jul 5 17:37:34 2018 +0200
Revert "add perm news blurb about wineconf".
This reverts commit 941ab4df439b4e0f76ec1b1a3e69a484feac7b08.
WineConf 2018 is over.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
templates/en/home.template | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/templates/en/home.template b/templates/en/home.template
index 8eec1bf..0411569 100644
--- a/templates/en/home.template
+++ b/templates/en/home.template
@@ -161,20 +161,6 @@
<h1 class="title"><a href="{$root}/news">News and Updates</a></h1>
- <p class="newstitle"><a href="/news/2018030801">WineConf 2018 - 25th anniversary</a></p>
- <div class="newsblock">
- <p>The Wine Project is pleased to announce that WineConf 2018 will
- take place on June 29 - July 1 2018 in The Hague, The
- Netherlands. This will coincide with the 25th anniversary of Wine.</p>
- <p>WineConf is the Wine Project's annual conference, where members of
- the Wine community, the broader Free Software community and interested
- users meet up over food and beverages. We traditionally also have a
- number of talks by attendees, as well as some formal and informal
- discussions about anything vaguely Wine related.</p>
- <p>Please see the <a href="https://wiki.winehq.org/WineConf2018">WineConf2018 page</a>
- for further details.</p>
- </div>
-
<!--EXEC:[news?n=3]-->
<p><a href="{$root}/news" class="btn btn-default"><span class="glyphicon glyphicon-chevron-right"></span> more news...</a></p>