Commit 13b93720 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'hardening-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening fixes from Kees Cook:

 - Replace remaining open-coded struct_size_t() instance (Gustavo A. R.
   Silva)

 - Adjust vboxsf's trailing arrays to be proper flexible arrays

* tag 'hardening-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  media: venus: Use struct_size_t() helper in pkt_session_unset_buffers()
  vboxsf: Use flexible arrays for trailing string member
parents 02aee814 cdddb626
......@@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt,
pkt->extradata_size = 0;
pkt->shdr.hdr.size =
struct_size((struct hfi_session_set_buffers_pkt *)0,
buffer_info, bd->num_buffers);
struct_size_t(struct hfi_session_set_buffers_pkt,
buffer_info, bd->num_buffers);
}
pkt->response_req = bd->response_required;
......
......@@ -68,9 +68,9 @@ struct shfl_string {
/** UTF-8 or UTF-16 string. Nul terminated. */
union {
u8 utf8[2];
u16 utf16[1];
u16 ucs2[1]; /* misnomer, use utf16. */
u8 legacy_padding[2];
DECLARE_FLEX_ARRAY(u8, utf8);
DECLARE_FLEX_ARRAY(u16, utf16);
} string;
};
VMMDEV_ASSERT_SIZE(shfl_string, 6);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment