From fef451758ac702e7c859cc7ccc473333711eb4af Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 13 Dec 2014 13:05:54 -0600 Subject: FS: Add a check for a NULL pathname. --- nuttx/fs/inode/fs_inodefind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuttx/fs/inode/fs_inodefind.c b/nuttx/fs/inode/fs_inodefind.c index f474d556f..3ca898fd7 100644 --- a/nuttx/fs/inode/fs_inodefind.c +++ b/nuttx/fs/inode/fs_inodefind.c @@ -77,7 +77,7 @@ FAR struct inode *inode_find(FAR const char *path, FAR const char **relpath) { FAR struct inode *node; - if (!*path || path[0] != '/') + if (!path || !*path || path[0] != '/') { return NULL; } -- cgit v1.2.3