From: Konstantinos Margaritis Date: Fri, 16 May 2025 10:44:36 +0000 (+0300) Subject: partial_load_u64 will fail if buf == NULL/c_len == 0 (#331) X-Git-Tag: vectorscan/5.4.12^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F323%2Fhead;p=thirdparty%2Fvectorscan.git partial_load_u64 will fail if buf == NULL/c_len == 0 (#331) --- 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; }