Closed MihaiUdrea closed 1 year ago
Hey MihaiUdrea,
Does the crash happen only with ini files?
It seams so. Don't really know the client API that it used, we encounter this when testing EnSoft>LPILE package with FileRedirection fixup present.
Darren,
The PrivateProfile APIs are only used for ini files. We have run into issues with apps calling some of the file based apis with a null in the parameter of the filename. I previously added protection in several of the file based wrappers to directly call the underlying api to allow it to return as it normally would. - Tim
Daren - I took a deeper look at this. It appears that GetPrivateProfileSectionInstance line 23 is the cause as it was not protected by the null check. I don't have time to address this myself right now.
For MijailUdrea: I believe you can avoid this issue by configuring the tool during packaging. If the ini file exists inside the package, the call would not be made in a way that triggers this issue. LPile (and other Ensoft products I have tested) works OK with the FRF if an ini file is included.
This bothered me over night so I took another look. I did fix this last year and the fix is in the Develop branch.
Yeah. Most people are using master still. I still need to fix the tests in develop branch before I move everything to master.
This issue is fixed from PSF release : version 1.0.220926.1
Calls to GetPrivateProfileSection with null filename causes the fixup and app to crash.
I would suggest updating
https://github.com/microsoft/MSIX-PackageSupportFramework/blob/14ec90a7acc8ee15f33b11e6ef22b6fe3e334541/fixups/FileRedirectionFixup/GetPrivateProfileSectionFixup.cpp#L23
to use
widen_argument