Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RegFreeWinRT support has bug in string handling that leads to failed DLL lookup #776

Closed
BenJKuhn opened this issue Jun 1, 2022 · 0 comments

Comments

@BenJKuhn
Copy link
Member

BenJKuhn commented Jun 1, 2022

RETURN_IF_FAILED(xmlReader->GetValue(&fileName, nullptr));

On this line, the fileName is held as a pointer to the XML parser buffer, which gets recycled frequently. The value is then used in an inner loop when reading class name, which moves the parser forward, potentially invalidating the data pointed to.

This causes the DLL name to be a bogus (but still typically valid) string, which doesn't lead to crashes, but does cause loadlibrary to fail. In some cases, this failure is masked by fallback logic in some projections that works, but is slower. In other cases, it leads to application failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant