Skip to content

Panic in monsterpub protocol: range end index 16 out of range for slice of length 15 #899

@cq-cyj

Description

@cq-cyj

Describe the bug

When trying to connect a newer version of the MonsterPub device (specifically the monsterpub-MP1X_OM_P4-Peripheralld), the Intiface Central mobile app immediately panics and crashes during the device initialization phase.

It seems the BLE broadcast name or characteristic data length returned by the newer device is 16 bytes, which causes a slice out-of-bounds panic in monsterpub.rs:115.

Environment

  • App: Intiface Central Mobile (iOS)
  • Device: Sistalk MonsterPub Ori Series 2 (Newer model with heating and screen)

Error Log / Backtrace

thread 'intiface-thread-15' panicked at 'range end index 16 out of range for slice of length 15':
/Users/qdot/code/buttplug/crates/buttplug_server/src/device/protocol_impl/monsterpub.rs:115
   0: backtrace::backtrace::trace
   1: backtrace::capture::Backtrace::create
   2: backtrace::capture::Backtrace::new
   3: log_panics::Config::install_panic_hook::{{closure}}
   ...
   10: <buttplug_server::device::protocol_impl::monsterpub::MonsterPubInitializer as buttplug_server::device::protocol::ProtocolInitializer>::initialize::{{closure}}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions