mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
4e36eec244
https://bugzilla.samba.org/show_bug.cgi?id=13622 . The check ('bandsize > SIZE_MAX/nbands' is wrong, since it caps the total size to the wrong data type size_t instead of off_t -- samba is always built with LFS support so off_t is always 64bits, while size_t is 32bit son a 32bit platform. This has caused issues already, capping size of the bands: https://bugs.debian.org/974868 . Since there's another overflow check already, let's just fold this one to the following one and log a more complete error message. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Sat Jan 4 20:47:35 UTC 2025 on atb-devel-224