From bf475e4b76b4731126661baf4b3d0b19eed8a997 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Mon, 1 Jul 2024 12:17:53 +0200 Subject: [PATCH] Fix bug leading to call get_unchecked on empty array UB --- 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;