Repository navigation
Conversation
GetInputPropertiesListPropertyItems put the name and string value of
every list item straight into json. libobs keeps items as they were
added, so an item with a NULL name or NULL string value made json throw
std::logic_error ("basic_string: construction from null is not valid")
on the websocket thread, and OBS aborted. The macOS Screen Capture
source adds a placeholder with a NULL value at the top of its display
and application lists, so the request crashed OBS every time for those
properties (upstream obsproject/obs-studio#13905, reported by
sgaldeano).
A NULL name or value is now reported as an empty string, which is also
what the properties dialog stores when such an entry is picked. Items
with a name and value are reported as before.
Port of obsproject/obs-websocket#1355 by xiaoshao9704.
Refs obs-rust/obs-studio#1266.
Co-Authored-By: XiaoShao <26596822+xiaoshao9704@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GetInputPropertiesListPropertyItemsput the name and string value of every list item straight into json (Utils::Obs::ArrayHelper::GetListPropertyItems(),src/utils/Obs_ArrayHelper.cpplines 270 and 277). libobs keeps items as they were added, so an item with a NULL name or NULL string value made json throwstd::logic_error("basic_string: construction from null is not valid") on the websocket thread, and OBS aborted. The macOS Screen Capture source adds a placeholder with a NULL value at the top of its display and application lists, so the request crashed OBS every time for those properties (upstream obsproject/obs-studio#13905, reported by sgaldeano).A NULL name or value is now reported as an empty string, which is also what the properties dialog stores when such an entry is picked. Items with a name and value are reported as before.
Port of obsproject/obs-websocket#1355 by xiaoshao9704 (co-author on the commit).
Tested in obs-rust/obs-studio with
test_ws_list_property_items, which compiles this ArrayHelper against libobs: 2 of 3 cases fail at 0d663ee (an item with a NULL value, an item with a NULL name) and 3 of 3 pass with the fix, in both libobs lanes. Also in a full OBS build (frontend + obs-websocket) in both lanes, and end to end: with an input that has such items, the release v0.1.0-beta.20261014 and current master abort on the request; builds with this branch answer with empty strings.Refs obs-rust/obs-studio#1266. The obs-rust/obs-studio PR that moves the submodule to this branch carries the regression test and closes the issue.
🤖 Generated with Claude Code