microsoft / Windows-classic-samples

This repo contains samples that demonstrate the API used in Windows classic desktop applications.
Other
5.1k stars 3.23k forks source link

RegfsProvider fails displaying HKEY_CURRENT_USER because of the * entry #306

Open Dhebug opened 1 year ago

Dhebug commented 1 year ago

In RegfsProvider::PopulateDirInfoForPath the _regOps.EnumerateKey does not seem to perform any filtering on the keys is fetches, so if it encounters a key containing characters invalid for the Windows File System, PrjFillDirEntryBuffer will refuse the entry and the enumeration of the directory will abort

A possible fix is to have EnumerateKey only perform the entries.SubKeys.push_back(entry); if the keyName has passed some sanity check.