diff options
author | Luis Henriques <luis@igalia.com> | 2025-01-31 15:26:20 +0000 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-01-31 17:43:37 +0100 |
commit | 999aee6c0d6bf1ac67c3b89472f32fd1d384cf44 (patch) | |
tree | e15dd7a7050cca52006120bc203384f8d32e3873 | |
parent | 64de51de4909eb7b68e982ab9922eb24dda4899e (diff) | |
download | libfuse-999aee6c0d6bf1ac67c3b89472f32fd1d384cf44.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>
-rw-r--r-- | lib/fuse_lowlevel.c | 2 |
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 |