From: Andreas Schwab <schwab@suse.de>
To: libc-hacker@sources.redhat.com
Subject: Fix unaligned access
Date: Wed, 13 Jul 2005 11:21:00 -0000 [thread overview]
Message-ID: <jeeka354tu.fsf@sykes.suse.de> (raw)
This fixes an unaligned access during nscd communication.
Andreas.
2005-07-13 Andreas Schwab <schwab@suse.de>
* nscd/nscd_helper.c (get_mapping): Align control message buffer.
--- nscd/nscd_helper.c.~1.10.~ 2005-02-23 11:25:53.000000000 +0100
+++ nscd/nscd_helper.c 2005-07-13 11:54:38.000000000 +0200
@@ -176,7 +176,7 @@ get_mapping (request_type type, const ch
iov[0].iov_base = resdata;
iov[0].iov_len = keylen;
- char buf[CMSG_SPACE (sizeof (int))];
+ char buf[CMSG_SPACE (sizeof (int))] __attribute__ ((aligned));
struct msghdr msg = { .msg_iov = iov, .msg_iovlen = 1,
.msg_control = buf, .msg_controllen = sizeof (buf) };
struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg);
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next reply other threads:[~2005-07-13 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-13 11:21 Andreas Schwab [this message]
2005-07-13 14:25 ` Ulrich Drepper
2005-07-13 15:01 ` Andreas Schwab
2005-07-13 22:55 ` Ulrich Drepper
2005-07-14 7:56 ` Andreas Schwab
2005-07-14 7:59 ` Ulrich Drepper
2005-07-14 8:55 ` Andreas Schwab
2005-07-14 14:54 ` Ulrich Drepper
2005-07-14 15:34 ` Andreas Schwab
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=jeeka354tu.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=libc-hacker@sources.redhat.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).