[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Sat Mar 5 08:05:01 UTC 2022
The branch, master has been updated
via 3f977cd6f83 s3:lib: Fix possible 32-bit arithmetic overflow
from df7efdf0465 s3: smbd: Cleanup - Make rmdir_internals() use NTSTATUS internally without depending on errno.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3f977cd6f839fd904529f12ef2ee5caae88af0ab
Author: Pavel Filipenský <pfilipen at redhat.com>
Date: Mon Feb 28 23:33:22 2022 +0100
s3:lib: Fix possible 32-bit arithmetic overflow
Reported by covscan.
Potentially overflowing expression "glue->gtimeout * 1000" with type "int"
(32 bits, signed) is evaluated using 32-bit arithmetic, and then used in
a context that expects an expression of type "uint64_t" (64 bits, unsigned).
Signed-off-by: Pavel Filipenský <pfilipen at redhat.com>
Reviewed-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Sat Mar 5 08:04:28 UTC 2022 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
source3/lib/tevent_glib_glue.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/tevent_glib_glue.c b/source3/lib/tevent_glib_glue.c
index b83f2036d9a..1e1d62e585c 100644
--- a/source3/lib/tevent_glib_glue.c
+++ b/source3/lib/tevent_glib_glue.c
@@ -538,7 +538,6 @@ static bool get_glib_fds_and_timeout(struct tevent_glib_glue *glue)
static bool tevent_glib_update_events(struct tevent_glib_glue *glue)
{
- uint64_t microsec;
struct timeval tv;
bool ok;
@@ -580,9 +579,8 @@ static bool tevent_glib_update_events(struct tevent_glib_glue *glue)
return true;
}
- microsec = glue->gtimeout * 1000;
- tv = tevent_timeval_current_ofs(microsec / 1000000,
- microsec % 1000000);
+ tv = tevent_timeval_current_ofs(glue->gtimeout / 1000,
+ (glue->gtimeout % 1000) * 1000);
glue->timer = tevent_add_timer(glue->ev,
glue,
--
Samba Shared Repository
More information about the samba-cvs
mailing list