diff options
author | Martin Aumueller | 2008-08-03 17:26:30 +0200 |
---|---|---|
committer | Matt Colyer | 2008-08-04 23:00:21 -0700 |
commit | 07fcebbb5e8a741237815507f77ecc4caf264bb9 (patch) | |
tree | e350f8bcee3e3c3a22fc3e672c4d3a5c6b2f0ad5 | |
parent | ab40a42f43dcb273f812706f93d970f95c54bd3f (diff) | |
download | libplist-07fcebbb5e8a741237815507f77ecc4caf264bb9.tar.gz libplist-07fcebbb5e8a741237815507f77ecc4caf264bb9.tar.bz2 |
Don't crash when afc_get_dirlist returns NULL.
Signed-off-by: Matt Colyer <matt@colyer.name>
-rw-r--r-- | src/ifuse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ifuse.c b/src/ifuse.c index 5ef354c..4ea91af 100644 --- a/src/ifuse.c +++ b/src/ifuse.c @@ -69,6 +69,10 @@ static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, AFClient *afc = fuse_get_context()->private_data; dirs = afc_get_dir_list(afc, path); + + if(!dirs) + return -ENOENT; + for (i = 0; strcmp(dirs[i], ""); i++) { filler(buf, dirs[i], NULL, 0); } |