From dce6f59b106bccaba63bd1386138ab539864be89 Mon Sep 17 00:00:00 2001 From: Luis Henriques Date: Fri, 31 Jan 2025 15:26:20 +0000 Subject: [PATCH] fuse_lowlevel.c: fix possible 64 bits value truncation Because conn.want_ext is a uint64_t, copying it into a uint32_t may result in truncating it's value. This patch fixes a bug in do_init() where the 32 bits copy is again converted into a 64 bits value, because it will be used in convert_to_conn_want_ext(). Signed-off-by: Luis Henriques --- lib/fuse_lowlevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index c993860..36baaa6 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2178,7 +2178,7 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) se->got_init = 1; if (se->op.init) { - uint32_t want_ext_default = se->conn.want_ext; + uint64_t want_ext_default = se->conn.want_ext; int rc; // Apply the first 32 bits of capable_ext to capable -- 2.30.2