This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6942] Unaligned access in resolv
- From: "hjl dot tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Oct 2008 18:04:30 -0000
- Subject: [Bug libc/6942] Unaligned access in resolv
- References: <20081004174738.6942.hjl.tools@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From hjl dot tools at gmail dot com 2008-10-07 18:04 -------
In res_send.c, there are
&& anscp
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|| *thisanssizp < *thisresplenp)) {
u_char *newp = malloc (MAXPACKET);
if (newp != NULL) {
*anssizp = MAXPACKET;
*thisansp = ans = newp;
}
}
HEADER *anhp = (HEADER *) *thisansp;
if (__builtin_expect (statp->qhook || statp->rhook, 0)) {
if (anssiz < MAXPACKET && ansp) {
u_char *buf = malloc (MAXPACKET);
if (buf == NULL)
return (-1);
memcpy (buf, ans, HFIXEDSZ);
*ansp = buf;
ans = buf;
anssiz = MAXPACKET;
}
}
if (__builtin_expect (anscp != NULL, 1)) {
u_char *newp = malloc (MAXPACKET);
if (newp == NULL) {
*terrno = ENOMEM;
__res_iclose(statp, false);
return (0);
}
*thisanssizp = MAXPACKET;
*thisansp = newp;
anhp = (HEADER *) newp;
len = rlen;
Are they properly aligned?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6942
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.