From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20143 invoked by alias); 13 Jul 2005 11:21:56 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 20127 invoked by uid 22791); 13 Jul 2005 11:21:56 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 13 Jul 2005 11:21:56 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5E0D91DA9A for ; Wed, 13 Jul 2005 13:21:50 +0200 (CEST) From: Andreas Schwab To: libc-hacker@sources.redhat.com Subject: Fix unaligned access X-Yow: I want a WESSON OIL lease!! Date: Wed, 13 Jul 2005 11:21:00 -0000 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2005-07/txt/msg00015.txt.bz2 This fixes an unaligned access during nscd communication. Andreas. 2005-07-13 Andreas Schwab * 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."