Skip to content

Commit 622393c

Browse files
committedAug 28, 2024
Merge pull request #95317 from esainane/when-i-am-64
binder_common: Fix uninitialized marshalling for `PtrToArg<char32_t>`
2 parents 3bc84c2 + e6a7c63 commit 622393c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎core/variant/binder_common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ struct VariantCaster<char32_t> {
214214
template <>
215215
struct PtrToArg<char32_t> {
216216
_FORCE_INLINE_ static char32_t convert(const void *p_ptr) {
217-
return char32_t(*reinterpret_cast<const int *>(p_ptr));
217+
return char32_t(*reinterpret_cast<const int64_t *>(p_ptr));
218218
}
219219
typedef int64_t EncodeT;
220220
_FORCE_INLINE_ static void encode(char32_t p_val, const void *p_ptr) {
221-
*(int *)p_ptr = p_val;
221+
*(int64_t *)p_ptr = p_val;
222222
}
223223
};
224224

0 commit comments

Comments
 (0)