From 15447cc672db53aa4e39de6a403396a3b6ed9e22 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 11 Sep 2020 09:44:25 +0200 Subject: [PATCH] dceprc: signature rust check with is_char_boundary before calling split_at which would panic --- rust/src/dcerpc/detect.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/dcerpc/detect.rs b/rust/src/dcerpc/detect.rs index 7e1296c3ae..8f1b27727f 100644 --- a/rust/src/dcerpc/detect.rs +++ b/rust/src/dcerpc/detect.rs @@ -60,7 +60,7 @@ pub struct DCEOpnumData { } fn extract_op_version(opver: &str) -> Result<(u8, u16), ()> { - if opver.len() < 1 { + if !opver.is_char_boundary(1){ return Err(()); } let (op, version) = opver.split_at(1);