-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(audio-info): crash when device name contains special characters #4095
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
fix(audio-info): crash when device name contains special characters #4095
Conversation
114b384 to
0b5df33
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4095 +/- ##
=========================================
Coverage ? 15.48%
=========================================
Files ? 94
Lines ? 19025
Branches ? 8772
=========================================
Hits ? 2946
Misses ? 14443
Partials ? 1636
Flags with carried forward coverage won't be shown. Click here to find out more.
|
d517461 to
cf38659
Compare
39e03f6 to
29d3bb8
Compare
Bundle ReportBundle size has no change ✅ |
53b055b to
3e9b451
Compare
3e9b451 to
27c9e0b
Compare
27c9e0b to
7848661
Compare
This comment was marked as resolved.
This comment was marked as resolved.
7848661 to
1d1288c
Compare
Replaces the fixed-size wchar_t array with a std::vector<wchar_t> for constructing the environment block. This improves safety and flexibility by avoiding stack allocation for large environment blocks and using dynamic memory management.
85ff42b to
554d2a9
Compare
The create_environment_block function now takes a const reference to bp::environment, ensuring the environment is not modified and allowing the function to accept const arguments.
Moves the declaration of the iterator inside the if statement for clarity and restricts its scope to where it is used in the case-insensitive environment variable search.
34983ed to
17e549f
Compare
|

Description
This PR fixes audio-info (and maybe dxgi-info) from crashing when special characters exist in the device names or any properties.
Additionally, the formatting was slightly modified for dxgi-info. The
outputline was previously included even if the device had no output devices attached. The location of the empty line was also changed.To complete the fix I moved the utf conversion functions out of misc.cpp/h in order to simplify inclusion of these functions in the tool binaries. This is still somewhat more complex than it needs to be due to having to include logging, which requires
libdisplaydeviceand FFmpeg (libavutil).Finally, I corrected some IDE and Sonar complaints such as:
Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist