* [PATCH] fix signed overflow in ftok
@ 2017-08-12 2:55 Daniel Sabogal
0 siblings, 0 replies; only message in thread
From: Daniel Sabogal @ 2017-08-12 2:55 UTC (permalink / raw)
To: musl
---
src/ipc/ftok.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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));
}
--
2.14.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-12 2:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-12 2:55 [PATCH] fix signed overflow in ftok Daniel Sabogal
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).