Module: tools
Branch: master
Commit: ddf7c8a5987f858d9a25a6b8a803d73ac806f109
URL: https://gitlab.winehq.org/winehq/tools/-/commit/ddf7c8a5987f858d9a25a6b8a80…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Aug 25 11:15:58 2022 +0200
testbot/RestoreVM: When renaming a VM, warn if a disk was not renamed.
It means the name of that disk is not specific to the VM and may thus
end up being shared with the original VM.
---
testbot/scripts/RestoreVM | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testbot/scripts/RestoreVM b/testbot/scripts/RestoreVM
index 29f5f43d..b020211a 100755
--- a/testbot/scripts/RestoreVM
+++ b/testbot/scripts/RestoreVM
@@ -502,6 +502,9 @@ else
dst_target=`echo "$src_target" | sed -e "s/$vm/$opt_vm/g"`
rm "$src_disk"
ln -s "$dst_target" "$dst_disk" || failed=1
+ elif [ "$src_disk" = "$dst_disk" ]
+ then
+ warning "not renaming '$src_disk'"
else
mv "$src_disk" "$dst_disk" || failed=1
fi
Module: wine
Branch: master
Commit: 52a83ffe4ef1ef58520b09f8d2144dcf291b622b
URL: https://gitlab.winehq.org/wine/wine/-/commit/52a83ffe4ef1ef58520b09f8d2144d…
Author: Eric Pouech <eric.pouech(a)gmail.com>
Date: Wed Sep 21 08:51:02 2022 +0200
avifil32: Fix GCC 12.2 warning (-Warray-bounds).
Since struct _IAVIStreamImpl has a pointer to a WAVEFORMATEX,
GCC 12.2 emits warning when dereferencing that pointer when
the block has been allocated with sizeof(PCMWAVEFORMAT).
The warning is fixed by always allocating with sizeof(WAVEFORMATEX).
This will overallocate in case of a PCM stream.
The alternative would have been to store in struct _IAVIStreamImpl
a pointer to PCMWAVEFORMAT instead, and add the casting to a
WAVEFORMATEX when needed. That would clutter the code IMO since most
of the ACM APIs expect a LPWAVEFORMATEX.
/home/eric/work/wine/dlls/avifil32/acmstream.c: In function 'AVIFILE_OpenCompressor':
/home/eric/work/wine/dlls/avifil32/acmstream.c:105:24: warning: array subscript 'struct tWAVEFORMATEX[0]' is partly outside array bounds of 'unsigned char[16]' [-Warray-bounds]
105 | This->lpOutFormat->wFormatTag = WAVE_FORMAT_PCM;
| ^~
/home/eric/work/wine/dlls/avifil32/acmstream.c:101:27: note: object of size 16 allocated by 'HeapAlloc'
101 | This->lpOutFormat = HeapAlloc(GetProcessHeap(), 0, This->cbOutFormat);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/avifil32/acmstream.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/avifil32/acmstream.c b/dlls/avifil32/acmstream.c
index fe5a8e3660b..be8c7b7dc33 100644
--- a/dlls/avifil32/acmstream.c
+++ b/dlls/avifil32/acmstream.c
@@ -97,7 +97,7 @@ static HRESULT AVIFILE_OpenCompressor(IAVIStreamImpl *This)
if (This->lpOutFormat == NULL) {
/* we must decode to default format */
- This->cbOutFormat = sizeof(PCMWAVEFORMAT);
+ This->cbOutFormat = sizeof(WAVEFORMATEX);
This->lpOutFormat = HeapAlloc(GetProcessHeap(), 0, This->cbOutFormat);
if (This->lpOutFormat == NULL)
return AVIERR_MEMORY;
@@ -249,7 +249,7 @@ static HRESULT WINAPI ACMStream_fnCreate(IAVIStream *iface, LPARAM lParam1,
if (((LPWAVEFORMATEX)lParam2)->wFormatTag != WAVE_FORMAT_PCM)
This->cbOutFormat = sizeof(WAVEFORMATEX) + ((LPWAVEFORMATEX)lParam2)->cbSize;
else
- This->cbOutFormat = sizeof(PCMWAVEFORMAT);
+ This->cbOutFormat = sizeof(WAVEFORMATEX);
This->lpOutFormat = HeapAlloc(GetProcessHeap(), 0, This->cbOutFormat);
if (This->lpOutFormat == NULL)