27 Sep
2022
27 Sep
'22
4 p.m.
Huw Davies (@huw) commented about server/registry.c:
+ memcmp( key_fullpath, applicationhive_fullpath, sizeof(applicationhive_fullpath) )) + { + set_error( STATUS_PRIVILEGE_NOT_HELD ); + } + free( key_fullpath ); + if (get_error()) return 0; + + load_registry( key, filename ); + if (get_error()) + { + delete_key( key, 1 ); + return 0; + } + + key->filename = malloc( strlen( filename ) + 1 ); + strcpy( key->filename, filename ); Use `strdup()` and test for failure.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/820#note_9409