]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
partial_load_u64 will fail if buf == NULL/c_len == 0 (#331) 323/head
authorKonstantinos Margaritis <markos@users.noreply.github.com>
Fri, 16 May 2025 10:44:36 +0000 (13:44 +0300)
committerGitHub <noreply@github.com>
Fri, 16 May 2025 10:44:36 +0000 (13:44 +0300)
src/rose/program_runtime.c

index 1273f79978200e8f37029532bf31d0f7b929e734..3e7752c7066e0d8b1ff4e89191c9445638650c3a 100644 (file)
@@ -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;
         }