summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2021-05-11 09:43:08 +0200
committerSimon Rettberg2021-05-11 09:43:08 +0200
commit12cd8117e210f4da384540e4a1205e3172cf7ceb (patch)
tree479048513250f12bccce77f83e4443302b841ee5
parent[SERVER] Honor uplinkTimeout directly when connecting to alt-server (diff)
downloaddnbd3-12cd8117e210f4da384540e4a1205e3172cf7ceb.tar.gz
dnbd3-12cd8117e210f4da384540e4a1205e3172cf7ceb.tar.xz
dnbd3-12cd8117e210f4da384540e4a1205e3172cf7ceb.zip
[SERVER] Fix UB
-rw-r--r--src/server/rpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/rpc.c b/src/server/rpc.c
index 566f35c..119bbd5 100644
--- a/src/server/rpc.c
+++ b/src/server/rpc.c
@@ -104,7 +104,7 @@ void rpc_init()
if ( fd != -1 ) {
uint32_t bla = 1;
(void)!read( fd, &bla, 4 );
- randomRunId = (randomRunId << 32) | bla;
+ randomRunId = ((randomRunId & 0xffffffff) << 32) | bla;
}
close( fd );
}