From bfcd9be90d20c3e1690a3e1f1412def00b714781 Mon Sep 17 00:00:00 2001 From: Mikael Hermansson Date: Mon, 9 Feb 2026 18:20:16 +0100 Subject: [PATCH] Zero out padding in `NodePath` serialization --- core/io/marshalls.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index 6eb7e2db04..a7260a3a1e 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -1519,7 +1519,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo encode_uint32(utf8.length(), buf); buf += 4; memcpy(buf, utf8.get_data(), utf8.length()); - buf += pad + utf8.length(); + buf += utf8.length(); + memset(buf, 0, pad); + buf += pad; } r_len += 4 + utf8.length() + pad;