libbluray | branch: master | hpi1 <[email protected]> | Wed May 13 11:45:50 2015 +0300| [ac97f9c02ab9b939712fae5e8798c40952624580] | committer: hpi1
bd_open(): return NULL if disc root is NULL Fixes crash when disc files are accessed later. > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ac97f9c02ab9b939712fae5e8798c40952624580 --- src/libbluray/bluray.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c index 44b354f..eba9c5e 100644 --- a/src/libbluray/bluray.c +++ b/src/libbluray/bluray.c @@ -1461,7 +1461,10 @@ BLURAY *bd_open(const char *device_path, const char *keyfile_path) return NULL; } - bd_open_disc(bd, device_path, keyfile_path); + if (!bd_open_disc(bd, device_path, keyfile_path)) { + bd_close(bd); + return NULL; + } return bd; } _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
