From 7e0503c3b8211239b6068b24f406b5e45270063a Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Fri, 16 May 2025 13:44:36 +0300 Subject: [PATCH] partial_load_u64 will fail if buf == NULL/c_len == 0 (#331) --- src/rose/program_runtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rose/program_runtime.c b/src/rose/program_runtime.c index 1273f799..3e7752c7 100644 --- a/src/rose/program_runtime.c +++ b/src/rose/program_runtime.c @@ -688,7 +688,9 @@ int roseCheckMask(const struct core_info *ci, u64a and_mask, u64a cmp_mask, shift_l = c_len - ci->len; c_len = ci->len; } - data = partial_load_u64a(ci->buf, c_len); + if (c_len) { + data = partial_load_u64a(ci->buf, c_len); + } data <<= h_len << 3; data |= data_h; }