]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:vfs_fruit: Fix crash for nbands == 0
authorPavel Filipenský <pfilipensky@samba.org>
Thu, 2 Jan 2025 17:25:22 +0000 (18:25 +0100)
committerPavel Filipensky <pfilipensky@samba.org>
Sat, 4 Jan 2025 19:51:32 +0000 (19:51 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
selftest/knownfail
source3/modules/vfs_fruit.c

index 7ae2ac1bc5e0f4037723d73941cd128c7d91cfec..51aae99d6b48fd9ded957238ca87bafddb6d3a55 100644 (file)
@@ -4,7 +4,6 @@
 # "make test" will not report failures for tests listed here and will consider
 # a successful run for any of these tests an error.
 
-^samba3.vfs.fruit_timemachine # this fails as number of band==0 causes divison by 0
 ^samba3.blackbox.failure.failure # this is designed to fail, for testing our test infrastructure
 .*driver.add_driver_timestamps # we only can store dates, not timestamps
  ^samba3.smbtorture_s3.crypt_server\(nt4_dc\).SMB2-SESSION-REAUTH # expected to give ACCESS_DENIED SMB2.1 doesn't have encryption
index 9d1e8badd61c3fb298368e3716caacaaf63c47c4..76ad01331865b6ac4fec00cb03a59503b66da07c 100644 (file)
@@ -5213,7 +5213,7 @@ static bool fruit_get_num_bands(vfs_handle_struct *handle,
        TALLOC_FREE(bands_dir);
 
        *_nbands = nbands;
-       return true;
+       return nbands > 0;
 }
 
 static bool fruit_tmsize_do_dirent(vfs_handle_struct *handle,