Blame SOURCES/freeipmi-1.2.1-bigendauth.patch

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