From: Daniel Sabogal Date: Sat, 12 Aug 2017 02:55:22 +0000 (-0400) Subject: fix signed overflow in ftok X-Git-Tag: v1.1.17~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=511b7042b3844b42a940f1c31436fb04ce93ac19;p=oweals%2Fmusl.git fix signed overflow in ftok --- diff --git a/src/ipc/ftok.c b/src/ipc/ftok.c index cd6002ed..c36b4b60 100644 --- a/src/ipc/ftok.c +++ b/src/ipc/ftok.c @@ -6,5 +6,5 @@ key_t ftok(const char *path, int id) struct stat st; if (stat(path, &st) < 0) return -1; - return ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) | ((id & 0xff) << 24)); + return ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) | ((id & 0xffu) << 24)); }