From 869ace655e7b324b9a76e004f21b3b6f69a6b338 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Tue, 2 Jul 2024 11:09:09 +0200 Subject: [PATCH] Fix bug in keyexpr::includes leading to call get_unchecked on empty array UB (#1208) --- commons/zenoh-keyexpr/src/key_expr/include.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/zenoh-keyexpr/src/key_expr/include.rs b/commons/zenoh-keyexpr/src/key_expr/include.rs index ca9efaee2d..15e4f50f40 100644 --- a/commons/zenoh-keyexpr/src/key_expr/include.rs +++ b/commons/zenoh-keyexpr/src/key_expr/include.rs @@ -41,7 +41,7 @@ impl Includer<&[u8], &[u8]> for LTRIncluder { if (lempty && !right.has_verbatim()) || (!lempty && self.includes(lrest, right)) { return true; } - if unsafe { right.has_direct_verbatim_non_empty() } { + if right.has_direct_verbatim() { return false; } right = Split::split_once(right, &DELIMITER).1;