aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_lowlevel.c
diff options
context:
space:
mode:
authorLuis Henriques <luis@igalia.com>2025-01-31 15:26:20 +0000
committerBernd Schubert <bernd@bsbernd.com>2025-02-10 16:56:45 +0100
commitdce6f59b106bccaba63bd1386138ab539864be89 (patch)
treee15dd7a7050cca52006120bc203384f8d32e3873 /lib/fuse_lowlevel.c
parent1d373c61aef0bf514f7259710812410ccae2fe74 (diff)
downloadlibfuse-dce6f59b106bccaba63bd1386138ab539864be89.tar.gz
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 <luis@igalia.com>
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r--lib/fuse_lowlevel.c2
1 files changed, 1 insertions, 1 deletions
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