Skip to content

Commit 13b9372

Browse files
committed
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
2 parents 02aee81 + cdddb62 commit 13b9372

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/media/platform/qcom/venus/hfi_cmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt,
251251

252252
pkt->extradata_size = 0;
253253
pkt->shdr.hdr.size =
254-
struct_size((struct hfi_session_set_buffers_pkt *)0,
255-
buffer_info, bd->num_buffers);
254+
struct_size_t(struct hfi_session_set_buffers_pkt,
255+
buffer_info, bd->num_buffers);
256256
}
257257

258258
pkt->response_req = bd->response_required;

fs/vboxsf/shfl_hostintf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ struct shfl_string {
6868

6969
/** UTF-8 or UTF-16 string. Nul terminated. */
7070
union {
71-
u8 utf8[2];
72-
u16 utf16[1];
73-
u16 ucs2[1]; /* misnomer, use utf16. */
71+
u8 legacy_padding[2];
72+
DECLARE_FLEX_ARRAY(u8, utf8);
73+
DECLARE_FLEX_ARRAY(u16, utf16);
7474
} string;
7575
};
7676
VMMDEV_ASSERT_SIZE(shfl_string, 6);

0 commit comments

Comments
 (0)