[libdvdnav-devel] [Git][videolan/libdvdread][master] dvd_input: fix potential calls to dlclose() with a NULL dvdcss_library
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Jul 31 16:57:18 UTC 2026
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread
Commits:
c32b0dd1 by Steve Lhomme at 2026-07-31T18:52:58+02:00
dvd_input: fix potential calls to dlclose() with a NULL dvdcss_library
This happens when the dvdcss is not found for DVD-A and DVD-VR.
+ indentation
- - - - -
1 changed file:
- src/dvd_input.c
Changes:
=====================================
src/dvd_input.c
=====================================
@@ -496,12 +496,14 @@ int dvdinput_setup(void *priv, dvd_logger_cb *logcb, dvd_type_t dvda_flag)
DVDcpxm_init = (int (*)(dvdcss_t, uint8_t *p_mkb))
dlsym(dvdcss_library, U_S "dvdcpxm_init");
#else
- DVDReadLog(priv, logcb, DVD_LOGGER_LEVEL_ERROR,
- "DVD-Audio headers not present, update the DVDCSS library");
- dlclose(dvdcss_library);
- dvdcss_library = NULL;
+ DVDReadLog(priv, logcb, DVD_LOGGER_LEVEL_ERROR,
+ "DVD-Audio headers not present, update the DVDCSS library");
+ dlclose(dvdcss_library);
+ dvdcss_library = NULL;
#endif
}
+ }
+ if(dvdcss_library != NULL) {
if(dlsym(dvdcss_library, U_S "dvdcss_crack")) {
DVDReadLog(priv, logcb, DVD_LOGGER_LEVEL_ERROR,
"Old (pre-0.0.2) version of libdvdcss found. "
@@ -514,7 +516,7 @@ int dvdinput_setup(void *priv, dvd_logger_cb *logcb, dvd_type_t dvda_flag)
dlclose(dvdcss_library);
dvdcss_library = NULL;
#ifdef HAVE_DVDCSS_DVDCPXM_H
- } else if( (dvda_flag != DVD_V) && (!DVDcpxm_read || !DVDcpxm_init) ) {
+ } else if( (dvda_flag != DVD_V) && (!DVDcpxm_read || !DVDcpxm_init) ) {
DVDReadLog(priv, logcb, DVD_LOGGER_LEVEL_ERROR,
"Missing symbols for DVD-Audio in %s, "
"this shouldn't happen !", CSS_LIB);
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/c32b0dd167b37d88b3427bab010b676982323c48
--
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/c32b0dd167b37d88b3427bab010b676982323c48
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libdvdnav-devel
mailing list