commit 6f3d68bc8b46bdc7b0f5f43918744d99746672a2
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Feb 27 09:38:22 2023 +0100

    libstore: Fix zero store size computation
    
    56d065041793 ("libstore: Fix undefined behavior") missed letting the sign
    bit be 0, thus leading to a negative store size, and thus /dev/zero
    would reject any read/write.

diff --git a/libstore/zero.c b/libstore/zero.c
index 2960c18a..b35d29a5 100644
--- a/libstore/zero.c
+++ b/libstore/zero.c
@@ -150,8 +150,9 @@ zero_open (const char *name, int flags,
     }
   else
     {
-      store_offset_t max_offs = ~((store_offset_t)1
-				  << (CHAR_BIT * sizeof (store_offset_t) - 2));
+      store_offset_t max_offs = (
+	  ((store_offset_t)1 << (CHAR_BIT * sizeof (store_offset_t) - 2))
+	  - 1) * 2 + 1;
       return store_zero_create (max_offs, flags, store);
     }
 }
