You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: libobs: obs_add_module_path() leaves the module path type uninitialized #1900
libobs/obs-module.c.h, obs_add_module_path() (same code upstream in libobs/obs-module.c).
Class
Correctness: an uninitialized field controls module loading.
How it is reached
obs_add_module_path(bin, data) builds a struct obs_module_path on the stack and sets only bin and data. Its type (enum obs_runtime_module_type) is never written. obs_find_modules2() then reports that type in each obs_module_info2, and the loading code branches on it:
whether a disabled module is skipped (info->type != OBS_MODULE_TYPE_CORE);
No in-tree loader reads these paths today: upstream obsproject/obs-studio@11a8445aa4 (plugin manager 1.5) added type and set it only on the typed paths the frontend passes to obs_load_plugins(), and made obs_load_all_modules() empty. So the uninitialized value reaches only outside callers of obs_find_modules2(), and through them libobs's loader if they pass the reported info on. Upstream has the same code.
Proposed fix and failing test
Set type explicitly in obs_add_module_path() to OBS_MODULE_TYPE_UNDEFINED, which matches the behaviour before the type existed (the disabled list applies; no legacy-core skip) and the type obs_open_module() gives. Add a test that adds a path with obs_add_module_path(), then checks the type reported by obs_find_modules2() and the resulting disabled-module and legacy behaviour.
Activity
rdoupe commentedon Oct 23, 2026
Claiming: #1900.
libobs: Set the module type of obs_add_module_path() paths
libobs: Set the module type of obs_add_module_path() paths (obs-rust#…