Zebediah Figura (@zfigura) commented about dlls/mspatcha/pa19.c:
> + }
> +
> + nt_headers->OptionalHeader.ImageBase = (DWORD)new_image_base;
> + result = TRUE;
> +
> + reloc_dir_remaining = (LONG)reloc_dir_size;
> + while (reloc_dir_remaining > 0) {
> +
> + if (reloc_block->SizeOfBlock <= (ULONG)reloc_dir_remaining
> + && reloc_block->SizeOfBlock > sizeof(IMAGE_BASE_RELOCATION))
> + {
> + reloc_block_base = (IMAGE_BASE_RELOCATION UNALIGNED *)(mapped_image_base +
> + image_rva_to_file_offset(nt_headers, reloc_block->VirtualAddress, mapped_image_base, mapped_image_size));
> + if (reloc_block_base)
> + {
> + reloc = (USHORT UNALIGNED *)((PUCHAR)reloc_block + sizeof(IMAGE_BASE_RELOCATION));
I don't think we want UNALIGNED, not least because it doesn't do anything on non-MSVC compilers. If any of these actually can be unaligned (can they?) then I think we should just use memcpy.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_45759
I'm aware that winecfg allows unlinking of symlinked folders, but this is very annoying when regularly recreating WINEPREFIXES. This change makes it easy to isolate those folders from the start.
--
v4: ntdll: Add environment variable to prevent symlinking dosdevices/z:
shell32: Add environment variable to prevent symlinking home folders
https://gitlab.winehq.org/wine/wine/-/merge_requests/3259
This is mostly just no-ops moving stuff around except for last patch, so they're in a consistent ordering for when we'll replace them to dispex vtbl methods, keeping those patches smaller and more obvious what they change.
Next MR will convert query_interface (and maybe destructor, QI will need a bit more prep work first).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3881