From 10e46b45ef6b52b1e81419ff3de62df6f0abe1c0 Mon Sep 17 00:00:00 2001 From: George McCollister Date: Thu, 21 Jan 2010 12:06:39 -0600 Subject: Pointers to non 32 bit aligned data were being cast to uint32_t * uint32_t pointers must point to 32 bit aligned data on ARM. Instead of padding the data to force it into alignment I altered the code to memcpy the data to an aligned location. I'd appreciate any and all feedback especially on whether I took the best approach. pam_test_client auth and pam_test_client acct now work on my armeb-xscale-linux-gnueabi target. Signed-off-by: George McCollister --- server/responder/common/responder_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/responder/common/responder_cmd.c') diff --git a/server/responder/common/responder_cmd.c b/server/responder/common/responder_cmd.c index 5d40d29fe..cd9890305 100644 --- a/server/responder/common/responder_cmd.c +++ b/server/responder/common/responder_cmd.c @@ -56,7 +56,7 @@ int sss_cmd_get_version(struct cli_ctx *cctx) sss_packet_get_body(cctx->creq->in, &req_body, &req_blen); if (req_blen == sizeof(uint32_t)) { - client_version = (uint32_t ) *req_body; + memcpy(&client_version, req_body, sizeof(uint32_t)); DEBUG(5, ("Received client version [%d].\n", client_version)); i=0; -- cgit