displays: converge key-name decoding on the fixed WinReg helper - #533
Merged
Conversation
The bounded KEY_NAME_INFORMATION decoding introduced by the #513 review now lives in HLab.Core (WinReg.GetHKeyName/DecodeKeyNameInformation), so every caller of RegistryKey(nint) gets the fix, not just GetEdid. Drop the local duplicate in MonitorDeviceHelper and point the safety test at the shared helper. The shared version is also stricter on the sizing probe: it requires STATUS_BUFFER_TOO_SMALL rather than merely a non-zero status before allocating. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supprime le doublon local de décodage de nom de clé de registre dans
MonitorDeviceHelper, en convergeant sur le helper durci deHLab.Core(WinReg.GetHKeyName/WinReg.DecodeKeyNameInformation).Le décodage borné de
KEY_NAME_INFORMATIONissu de la revue de #513 vit désormais dans HLab.Core, donc tous les appelants deRegistryKey(nint)bénéficient du correctif, pas seulementGetEdid.Détails
MonitorDeviceHelper.GetEdidappelleGetHKeyName(résolu via leusing static ...WinReg;déjà présent).GetRegistryKeyName+DecodeKeyNameInformation) sont supprimées.WindowsMonitorSafetyTestspointe surWinReg.DecodeKeyNameInformation.usingdevenus morts du fait de la suppression sont retirés (System.IO,HLab.Sys.Windows.Monitors.Factory).Pas de bump de sous-module :
HLab.Corereste sur7b6aeec, qui contient déjà le helper.Différence de comportement à noter
La version partagée est plus stricte sur la passe de dimensionnement : elle exige
STATUS_BUFFER_TOO_SMALL(0xC0000023) là où le doublon local se contentait destatus != 0avant d'allouer. C'est un durcissement, pas une simple déduplication.Vérification
dotnet build LittleBigMouse-Linux.slnf: 0 erreur (avertissements préexistants uniquement).dotnet test LittleBigMouse.DisplayLayout.Tests: 111/111 réussis.Le code touché est Windows-only à l'exécution ; la compilation croisée et le test unitaire de décodage sont la couverture maximale possible sur Linux — le chemin
ZwQueryKeylui-même n'est pas exercé.🤖 Generated with Claude Code