diff --git a/libyara/notebook.c b/libyara/notebook.c index cc173fd1a9..3680df029b 100644 --- a/libyara/notebook.c +++ b/libyara/notebook.c @@ -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]; }; ////////////////////////////////////////////////////////////////////////////////