From: Daniel Sabogal <dsabogalcc@gmail.com>
To: musl@lists.openwall.com
Subject: [PATCH] fix signed overflow in ftok
Date: Fri, 11 Aug 2017 22:55:22 -0400 [thread overview]
Message-ID: <20170812025522.20167-1-dsabogalcc@gmail.com> (raw)
---
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
reply other threads:[~2017-08-12 2:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170812025522.20167-1-dsabogalcc@gmail.com \
--to=dsabogalcc@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).