diff options
author | Michal Zidek <mzidek@redhat.com> | 2013-08-27 15:18:53 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-11-15 20:50:35 +0100 |
commit | 84fbb0cad534308254a8a8ad837d1924496cfe71 (patch) | |
tree | e73a9684d82b908cda90d9db4e41e4fd955ad907 /src/providers/krb5 | |
parent | 0bc28fce13b2e6616892d71a55b7765b8b7b7e74 (diff) | |
download | sssd-84fbb0cad534308254a8a8ad837d1924496cfe71.tar.gz sssd-84fbb0cad534308254a8a8ad837d1924496cfe71.tar.xz sssd-84fbb0cad534308254a8a8ad837d1924496cfe71.zip |
krb5: Alignment warning reported by clang
Do not store address from byte buffer into pointer
of diffrent type!
https://fedorahosted.org/sssd/ticket/1359
Diffstat (limited to 'src/providers/krb5')
-rw-r--r-- | src/providers/krb5/krb5_child_handler.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c index 92dec0d2a..d582d3f73 100644 --- a/src/providers/krb5/krb5_child_handler.c +++ b/src/providers/krb5/krb5_child_handler.c @@ -498,8 +498,8 @@ parse_krb5_child_response(TALLOC_CTX *mem_ctx, uint8_t *buf, ssize_t len, int32_t msg_len; int64_t time_data; struct tgt_times tgtt; - uint32_t *expiration; - uint32_t *msg_subtype; + uint32_t expiration; + uint32_t msg_subtype; struct krb5_child_response *res; const char *upn = NULL; size_t upn_len = 0; @@ -574,12 +574,12 @@ parse_krb5_child_response(TALLOC_CTX *mem_ctx, uint8_t *buf, ssize_t len, } if (msg_type == SSS_PAM_USER_INFO) { - msg_subtype = (uint32_t *)&buf[p]; - if (*msg_subtype == SSS_PAM_USER_INFO_EXPIRE_WARN) - { - expiration = (uint32_t *)&buf[p+sizeof(uint32_t)]; + SAFEALIGN_COPY_UINT32(&msg_subtype, buf + p, NULL); + if (msg_subtype == SSS_PAM_USER_INFO_EXPIRE_WARN) { + SAFEALIGN_COPY_UINT32(&expiration, + buf + p + sizeof(uint32_t), NULL); if (pwd_exp_warning > 0 && - difftime(pwd_exp_warning, *expiration) < 0.0) { + difftime(pwd_exp_warning, expiration) < 0.0) { skip = true; } } |