]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
compression: lzxpress decompress empty string as empty string
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 11 May 2022 04:06:38 +0000 (16:06 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 May 2022 02:22:35 +0000 (02:22 +0000)
This mirrors the behaviour of lzxpress_compress, which "encodes" an
empty string as an empty string.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/compression/lzxpress.c
selftest/knownfail.d/lzexpress [deleted file]

index 288fa0bcba8fc6211e75bd26be5dd7f274faf1aa..f7da9b817f9d1a1522481e1ddf3921ae894b8eb4 100644 (file)
@@ -218,6 +218,10 @@ ssize_t lzxpress_decompress(const uint8_t *input,
        uint32_t indicator, indicator_bit;
        uint32_t nibble_index;
 
+       if (input_size == 0) {
+               return 0;
+       }
+
        output_index = 0;
        input_index = 0;
        indicator = 0;
diff --git a/selftest/knownfail.d/lzexpress b/selftest/knownfail.d/lzexpress
deleted file mode 100644 (file)
index a7dafdb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-samba4.local.compression.lzxpress_round_trip