Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22a8e7a2 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Fix counter in cmac_aes_k_calculate

It should be uint16_t, not uint8_t

Test: compilation
Bug: 246931912
Change-Id: Ie5eb56eb8c779ab01cd7d59dc822fb05be9c54fc
parent 2a252911
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static Octet16 cmac_aes_k_calculate(const Octet16& key) {
  Octet16 output;
  Octet16 x{0};  // zero initialized

  uint8_t i = 1;
  uint16_t i = 1;
  while (i <= cmac_cb.round) {
    /* Mi' := Mi (+) X  */
    xor_128((Octet16*)&cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], x);
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static Octet16 cmac_aes_k_calculate(const Octet16& key) {

  DVLOG(2) << __func__;

  uint8_t i = 1;
  uint16_t i = 1;
  while (i <= cmac_cb.round) {
    /* Mi' := Mi (+) X  */
    xor_128((Octet16*)&cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], x);