]> git.ipfire.org Git - thirdparty/samba.git/commit
utils: Fix CID 1638831 Division or modulo by zero
authorShwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Mon, 5 May 2025 07:47:05 +0000 (13:17 +0530)
committerVolker Lendecke <vl@samba.org>
Fri, 16 May 2025 07:10:57 +0000 (07:10 +0000)
commit68c7c19a0fb3f7c9124d77674fee5affb8a8ab02
treec3ac1f537ceaa7be39294a9b3357279b232701a2
parent4d7689e57e233563b331904120db77c536f35ab6
utils: Fix CID 1638831 Division or modulo by zero

The conditions now == start or pos == start_pos are checked
at the beginning of the function definition to ensure that avg
is non zero.
Also an appropriate print statement is added to indicate
the print status.

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 16 07:10:57 UTC 2025 on atb-devel-224
source3/utils/smbget.c