Skip to content

Commit

Permalink
fix: ensure all notebook allocations are 8-byte aligned (#1930)
Browse files Browse the repository at this point in the history
  • Loading branch information
vthib committed Jun 30, 2023
1 parent bcc6312 commit efa8765
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libyara/notebook.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ struct YR_NOTEBOOK_PAGE
// Pointer to next page.
YR_NOTEBOOK_PAGE* next;
// Page's data.
uint8_t data[0];
//
// This field must be 8-byte aligned to guarantee that all notebooks
// allocations are 8-byte aligned.
YR_ALIGN(8) uint8_t data[0];
};

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit efa8765

Please sign in to comment.