summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-11-18 16:32:55 +0100
committerSander Vrijders <sander@ouroboros.rocks>2023-11-20 13:19:48 +0100
commita37d4f406a4c6d39dbd6ff137dcd5a8047397d73 (patch)
treec7871b1018598ddc53d4fecfb893ee865e3759f3 /src/ipcpd/ipcp.c
parenteacf47723eb7084f6f067ad30bb58c163a7c918a (diff)
downloadouroboros-a37d4f406a4c6d39dbd6ff137dcd5a8047397d73.tar.gz
ouroboros-a37d4f406a4c6d39dbd6ff137dcd5a8047397d73.zip
lib: Fix FUSE output on Raspbian
For some reason, 'ls' on raspbian invoked the fuse readdir() in a loop where the first call had fuse_file_info * info set to NULL and subsequent calls had info->nonseekable set to 1. Since we don't check the value the info struct, this caused an infinite loop when trying to list the contents of the fuse filesystem subdirectories of /tmp/ouroboros/. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 5c1ffd03..617dd11f 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -176,7 +176,7 @@ static int ipcp_rib_readdir(char *** buf)
while (info[i] != NULL) {
(*buf)[i] = strdup(info[i]);
- if (*buf == NULL)
+ if ((*buf)[i] == NULL)
goto fail_dup;
i++;
}