[Bug network/20243] Misaligned access in res_query.c HEADER struct
danglin at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Tue Mar 22 17:40:00 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=20243
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> ---
commit 05dec22d7be722987ff07aebf9690f6078b3c4e9 (HEAD -> master, origin/master,
origin/HEAD)
Author: John David Anglin <danglin@gcc.gnu.org>
Date: Tue Mar 22 17:35:54 2022 +0000
resolv: Fix unaligned accesses to fields in HEADER struct
The structure HEADER is normally aligned to a word boundary but
sometimes it needs to be accessed when aligned on a byte boundary.
This change defines a new typedef, UHEADER, with alignment 1.
It is used to ensure the fields are accessed with byte loads and
stores when necessary.
V4: Change to res_mkquery.c deleted. Small whitespace fix.
V5: Move UHEADER typedef to resolv/resolv-internal.h. Replace all
HEADER usage with UHEADER in resolv/res_send.c.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list