projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1698fe6
)
fix signed overflow in ftok
author
Daniel Sabogal
<dsabogalcc@gmail.com>
Sat, 12 Aug 2017 02:55:22 +0000
(22:55 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 12 Aug 2017 13:09:27 +0000
(09:09 -0400)
src/ipc/ftok.c
patch
|
blob
|
history
diff --git
a/src/ipc/ftok.c
b/src/ipc/ftok.c
index cd6002ed18ec2743220d028f5a0ee972ccc303a7..c36b4b6003af532305ac2b461616d219f11f31b2 100644
(file)
--- 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 & 0xff
u
) << 24));
}