Hi Laszlo,

On Mon, Nov 06, 2023 at 06:49:48PM +0100, László Böszörményi (GCS) wrote:
>  Just for the record, the change broke self-testing of gphotofs big on
> all architectures. It fails with:
> autopkgtest: test command1: [ "$(./gphotofs 2>&1)" == 'fuse: missing
> mountpoint parameter' ]
> 165s command1             FAIL non-zero exit status 1
> 
> Will try to check and fix it.

I'm sorry. I did not realize that at the time parse_fuse_fd is called
mountpoint could legitimately be a NULL pointer. This happens when
gphotofs is run without arguments. As a consequence, the library
segfaults there and the autopkgtest fails. parse_fuse_fd needs to handle
a NULL pointer. Patch attached.

Helmut
diff --minimal -Nru fuse-2.9.9/debian/changelog fuse-2.9.9/debian/changelog
--- fuse-2.9.9/debian/changelog 2023-11-05 13:44:31.000000000 +0100
+++ fuse-2.9.9/debian/changelog 2023-11-06 21:26:44.000000000 +0100
@@ -1,3 +1,10 @@
+fuse (2.9.9-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix /dev/fd/N support to handle the absence of a mountpoint.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 06 Nov 2023 21:26:44 +0100
+
 fuse (2.9.9-7) unstable; urgency=medium
 
   * Use no for Rules-Requires-Root.
diff --minimal -Nru fuse-2.9.9/debian/patches/0009-dev-fd.patch 
fuse-2.9.9/debian/patches/0009-dev-fd.patch
--- fuse-2.9.9/debian/patches/0009-dev-fd.patch 2023-11-05 13:44:31.000000000 
+0100
+++ fuse-2.9.9/debian/patches/0009-dev-fd.patch 2023-11-06 21:26:44.000000000 
+0100
@@ -24,7 +24,7 @@
 +{
 +      int fd = -1, len = 0;
 +
-+      if (sscanf(mountpoint, "/dev/fd/%u%n", &fd, &len) == 1 && len == 
strlen(mountpoint))
++      if (mountpoint && sscanf(mountpoint, "/dev/fd/%u%n", &fd, &len) == 1 && 
len == strlen(mountpoint))
 +              return fd;
 +      return -1;
 +}

Reply via email to