]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Avoid integer overflow (CID 1035487)
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 6 Oct 2023 02:20:35 +0000 (15:20 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2023 02:18:31 +0000 (02:18 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/smbd/scavenger.c

index 5500a9f1565d68e4c630e98f3d5ebbe90126b33c..40b2fe55dcce8361083e1375e47652f199114e25 100644 (file)
@@ -423,7 +423,7 @@ void scavenger_schedule_disconnected(struct files_struct *fsp)
                return;
        }
        nttime_to_timeval(&disconnect_time, fsp->op->global->disconnect_time);
-       timeout_usec = 1000 * fsp->op->global->durable_timeout_msec;
+       timeout_usec = UINT64_C(1000) * fsp->op->global->durable_timeout_msec;
        until = timeval_add(&disconnect_time,
                            timeout_usec / 1000000,
                            timeout_usec % 1000000);