Explorar o código

dfs: assert the path is not null in dfs_filesystem_lookup

Clang complains about "Null pointer argument in call to string
comparison function". So assert on it.
Grissiom %!s(int64=11) %!d(string=hai) anos
pai
achega
4b7e9c6447
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      components/dfs/src/dfs_fs.c

+ 2 - 0
components/dfs/src/dfs_fs.c

@@ -85,6 +85,8 @@ struct dfs_filesystem *dfs_filesystem_lookup(const char *path)
 
 
     prefixlen = 0;
     prefixlen = 0;
 
 
+    RT_ASSERT(path);
+
     /* lock filesystem */
     /* lock filesystem */
     dfs_lock();
     dfs_lock();