libbinder_rs : removing assert while reading parcel
Asserting while trying to read the parcel received from another process
is causing crashes in fuzzer. Since, there is no gurantee that received
parcel may have exact data which is being read, this assert should not
exist.
Test: m libbinder_rs
Bug: 261827787
Change-Id: I8a96ef05e65ff8250644accd7d237a486ec16cff
diff --git a/libs/binder/rust/src/parcel.rs b/libs/binder/rust/src/parcel.rs
index 53a24af..e4c568e 100644
--- a/libs/binder/rust/src/parcel.rs
+++ b/libs/binder/rust/src/parcel.rs
@@ -566,9 +566,6 @@
impl<'a> ReadableSubParcel<'a> {
/// Read a type that implements [`Deserialize`] from the sub-parcel.
pub fn read<D: Deserialize>(&self) -> Result<D> {
- // The caller should have checked this,
- // but it can't hurt to double-check
- assert!(self.has_more_data());
D::deserialize(&self.parcel)
}