-
Notifications
You must be signed in to change notification settings - Fork 64
Description
I'm using WinCDEmu and sometimes when I mount an image (via shell integration) the vmnt crashes.
The problem is the wcsstr() wants to access to an unallocated memory address. Here is the source:
https://github.com/sysprogs/BazisLib/blob/master/bzshlp/Win32/LNGManager.cpp#L108
Call stack:
https://github.com/sysprogs/BazisLib/blob/master/bzshlp/textfile.h#L25
https://github.com/sysprogs/BazisLib/blob/master/bzshlp/textfile.h#L81
https://github.com/sysprogs/BazisLib/blob/master/bzshlp/Win32/LNGManager.cpp#L108
The error occurs only when any non-engilsh lng file exists in the WinCDEmu/langfiles folder.
I'm quite sure the problem is the BOM encoding of the lng files.
The english is encoded with the BOM header, but the others are not.
The english is "Generated by BazisLib STRGEN.EXE, http://bazislib.sysprogs.org/"
The nonenglish is "Generated by online LNG editor, http://wincdemu.sysprogs.org/translations/lngedit.php"
If I change the encodings of the non-english lng files to include the BOM header it works perfectly.