phy: fix FaultInjector returning a too big buffer when simulating a drop on tx
This commit is contained in:
parent
613fea062e
commit
68d60a202b
|
@ -297,7 +297,7 @@ impl<'a, Tx: phy::TxToken> phy::TxToken for TxToken<'a, Tx> {
|
||||||
};
|
};
|
||||||
|
|
||||||
if drop {
|
if drop {
|
||||||
return f(&mut self.junk);
|
return f(&mut self.junk[..len]);
|
||||||
}
|
}
|
||||||
|
|
||||||
let Self { token, state, config, .. } = self;
|
let Self { token, state, config, .. } = self;
|
||||||
|
|
Loading…
Reference in New Issue