Skip to content

Commit

Permalink
c/x86-xsave: fix infinite loop when the size is not aligned
Browse files Browse the repository at this point in the history
When the size of XSAVE region is not aligned on 16 bytes, the hexdump
logic was buggy and triggered an infinite print of spaces. Fix this.
  • Loading branch information
fishilico committed Feb 15, 2025
1 parent 57741ef commit e81941f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion c/x86-xsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ static void hexdump_both(const uint8_t *data1, const uint8_t *data2, unsigned in
while (j < 16) {
if (!(j % 4))
printf(" ");
printf(" ");
printf(" ");
j++;
}
}

Expand Down

0 comments on commit e81941f

Please sign in to comment.