mirror of
https://github.com/libimobiledevice/libplist
synced 2026-06-08 15:29:34 +00:00
Don't crash when afc_get_dirlist returns NULL.
Signed-off-by: Matt Colyer <matt@colyer.name>
This commit is contained in:
committed by
Matt Colyer
parent
ab40a42f43
commit
07fcebbb5e
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user