diff -urpN freeipmi-1.3.2.orig/libfreeipmi/util/ipmi-rmcpplus-util.c freeipmi-1.3.2.fixed/libfreeipmi/util/ipmi-rmcpplus-util.c --- freeipmi-1.3.2.orig/libfreeipmi/util/ipmi-rmcpplus-util.c 2013-09-11 01:23:16.000000000 +0200 +++ freeipmi-1.3.2.fixed/libfreeipmi/util/ipmi-rmcpplus-util.c 2013-10-22 17:56:59.439103790 +0200 @@ -157,15 +157,8 @@ ipmi_calculate_sik (uint8_t authenticati priv_byte |= 0x10; priv_byte |= (requested_privilege_level & 0xF); - memcpy (hash_data + hash_data_len, - (void *)&priv_byte, - sizeof (uint8_t)); - hash_data_len += sizeof (uint8_t); - - memcpy (hash_data + hash_data_len, - (void *)&user_name_len, - sizeof (uint8_t)); - hash_data_len += sizeof (uint8_t); + hash_data[hash_data_len++] = priv_byte; + hash_data[hash_data_len++] = user_name_len; if (user_name && user_name_len > 0) { @@ -1257,8 +1250,8 @@ ipmi_rmcpplus_check_rakp_4_integrity_che rv = memcmp (digest, integrity_check_value, compare_len) ? 0 : 1; cleanup: - secure_memset (buf, '\0', IPMI_MAX_KEY_DATA_LENGTH); - secure_memset (buf, '\0', IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH); + secure_memset (buf, '\0', sizeof(buf)); + secure_memset (digest, '\0', sizeof(digest)); return (rv); }