[Win32] Scanning of files managed by libsndfile crash if ASCII char > 127 in the filename
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Fix Released
|
High
|
Michael Pujos | ||
1.6 |
Fix Released
|
High
|
Michael Pujos |
Bug Description
On Windows, if your library has a file managed by libsndfile (WAV and FLAC even if FLAC are not supported under windows) and the full filename (including the path) has a character > ASCII code 127, it will crash in sf_open().
this happen in both SoundSourceSndF
sf_open() is passed an UTF-8 string which is invalid on Win32, as the filename is further passed to the win32 API CreateFile() which doesn't handle UTF-8 at all, just regular Extended ASCII.
So the fix is just to pass the non-UTF8 string to sf_open().
However that only work for filenames containing extended ascii chars - I don't know what happen with other language such as Japanese.
A better fix might be to recompile libsndfile with wide character support which means UTF-16 under windows. That way, CreateFileW is invoked instead of CreateFile.
I'm also trying to compile FLAC support into libsndfile.
Changed in mixxx: | |
importance: | Undecided → High |
milestone: | none → 1.6.2 |
status: | New → Confirmed |
Changed in mixxx: | |
milestone: | 1.7.0-moving → none |
Michael, is that new libsndfile DLL you contributed compiled with UTF-16 support?
Thanks,
Albert