dceprc: signature rust check with is_char_boundary

before calling split_at which would panic
pull/5292/head
Philippe Antoine 6 years ago committed by Victor Julien
parent 98285177ba
commit 15447cc672

@ -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);

Loading…
Cancel
Save