Huw Davies (@huw) commented about server/registry.c:
else file_set_error(); }
+static void load_app_registry( struct key *key, const char *filename, obj_handle_t *handle, + unsigned int access, unsigned int attributes ) +{ + static const WCHAR applicationhive_fullpath[] = {'\\', 'R', 'E', 'G', 'I', 'S', 'T', 'R', 'Y', '\\', 'A'}; + WCHAR *key_fullpath; + data_size_t key_fullpath_size; + + /* check if we are loading in \REGISTRY\A */ + key_fullpath = key_get_full_name( &key->obj, &key_fullpath_size ); + if (key_fullpath_size < (sizeof(applicationhive_fullpath)) || + memcmp( key_fullpath, applicationhive_fullpath, sizeof(applicationhive_fullpath)))
There's no need for the `()` around the first `sizeof()` and there's a missing space after the second `sizeof()` (to match the space at the beginning of `memcmp()`'s args. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/820#note_9138