[vlc-commits] [Git][videolan/vlc][master] medialibrary: devicelister: fix null-dereference
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Aug 4 13:42:44 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fed5c865 by Alexandre Janniaux at 2023-08-04T13:05:36+00:00
medialibrary: devicelister: fix null-dereference
The providerList can be NULL if `vlc_media_source_provider_List` returns
a NULL value if no results is returned by vlc_sd_GetNames.
For instance, it means that if no service discovery modules are
available, opening the Qt interface with the medialibrary enabled will
lead to such crash.
- - - - -
1 changed file:
- modules/misc/medialibrary/fs/devicelister.cpp
Changes:
=====================================
modules/misc/medialibrary/fs/devicelister.cpp
=====================================
@@ -58,6 +58,9 @@ bool DeviceLister::start( ml::IDeviceListerCb* cb )
&vlc_media_source_meta_list_Delete
};
+ if (providerList.get() == nullptr)
+ return false;
+
m_cb = cb;
auto nbProviders = vlc_media_source_meta_list_Count( providerList.get() );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fed5c86530bc50124dadb20f43e578cd8869a03c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fed5c86530bc50124dadb20f43e578cd8869a03c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list