[PATCH 0/4] Some small registry access fixes

Torge Matthies tmatthies at codeweavers.com
Fri May 6 15:54:58 CDT 2022


I had these in my patch repo for quite a while.

Patch 1 shouldn't need explanation.

The problem fixed by patch 2 and 3 is that
sizeof(KEY_{BASIC,VALUE_PARTIAL,FULL}_INFORMATION) are all slightly bigger
than the actual minimum size required to get all the requested info, because
those structs include an array of size 1 as their last member, which is
intended to be a variable length array.
Fixing these size calculations removes one allocation in wineserver and
reduces the amount of data transmitted by 1 - 2 bytes.

Patch 4 just reduces the amount of data transmitted from wineserver for each
update_display_cache_from_registry call, which is called every time the
display device lists are locked.

Torge Matthies (4):
  ntdll: Use correct output buffer size in RtlpNtEnumerateSubKey.
  ntdll: Calculate buffer sizes from registry structs correctly.
  win32u: Calculate buffer sizes from registry structs correctly.
  win32u: Query basic instead of full key information to get the
    LastWriteTime.

 dlls/ntdll/reg.c         | 10 +++++-----
 dlls/ntdll/unix/system.c |  2 +-
 dlls/win32u/sysparams.c  |  7 ++++---
 3 files changed, 10 insertions(+), 9 deletions(-)

-- 
2.36.0




More information about the wine-devel mailing list