[vlc-commits] modules: fix potential NULL dereference

Rémi Denis-Courmont git at videolan.org
Thu Oct 27 21:58:10 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 27 22:57:40 2016 +0300| [4d44e32a3e5507deb7e56b4ccd2116b354af1335] | committer: Rémi Denis-Courmont

modules: fix potential NULL dereference

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d44e32a3e5507deb7e56b4ccd2116b354af1335
---

 src/modules/bank.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/bank.c b/src/modules/bank.c
index 7bd32d0..30051db 100644
--- a/src/modules/bank.c
+++ b/src/modules/bank.c
@@ -175,8 +175,9 @@ static int AllocatePluginFile (module_bank_t *bank, const char *abspath,
     {
         plugin = vlc_cache_lookup(&bank->cache, relpath);
 
-        if (plugin->mtime != (int64_t)st->st_mtime
-         || plugin->size != (uint64_t)st->st_size)
+        if (plugin != NULL
+         && (plugin->mtime != (int64_t)st->st_mtime
+          || plugin->size != (uint64_t)st->st_size))
         {
             msg_Err(bank->obj, "stale plugins cache: modified %s",
                     plugin->abspath);



More information about the vlc-commits mailing list