Skip to content

Commit 93ea92f

Browse files
committed
[IPCProtocol] Enforce aligned wchar deserialization
1 parent 43fbcbd commit 93ea92f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/native/eventpipe/ds-protocol.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ ipc_message_try_parse_string_utf16_t_byte_array (
330330

331331
bool result = false;
332332

333+
ep_raise_error_if_nok (((uintptr_t)*buffer & 0x1u) == 0);
334+
333335
ep_raise_error_if_nok (ds_ipc_message_try_parse_uint32_t (buffer, buffer_len, string_byte_array_len));
334336
*string_byte_array_len *= sizeof (ep_char16_t);
335337

0 commit comments

Comments
 (0)