aboutsummaryrefslogtreecommitdiff
path: root/nfs
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-15 18:18:46 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-15 18:21:06 +0100
commit5b4eb54f379241e4ce56200fc6bbddca3576a07d (patch)
treee3f5addb5f49a63943a62b6e87c59e6cc7231d05 /nfs
parentf6c29f62283b05ca12bc032870b5e69bd50d82ba (diff)
downloadhurd-5b4eb54f379241e4ce56200fc6bbddca3576a07d.tar.gz
hurd-5b4eb54f379241e4ce56200fc6bbddca3576a07d.tar.bz2
hurd-5b4eb54f379241e4ce56200fc6bbddca3576a07d.zip
nfs: Fix shifting left
Shifting signed 0xffffffff 32 bit left is undefined behavior. Cast to unsigned to make it defined behavior.
Diffstat (limited to 'nfs')
-rw-r--r--nfs/nfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nfs/nfs.c b/nfs/nfs.c
index a5ea53d2..d89cfcb1 100644
--- a/nfs/nfs.c
+++ b/nfs/nfs.c
@@ -401,7 +401,7 @@ xdr_decode_64bit (int *p, long long *n)
p++;
low = ntohl (*p);
p++;
- *n = ((high & 0xffffffff) << 32) | (low & 0xffffffff);
+ *n = (((uint64_t)(high & 0xffffffff)) << 32) | (low & 0xffffffff);
return p;
}