You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you know, my own CBFParser shares a lot of similar code with CaesarSuite.
However, as CBFParser is built in Rust and not C#, I thought I would alert you to a potential bug (Not tested in Caesarsuite), which trips Rusts debug build underflow detection. The code in question is shared between CBFParser and CaesarSuite.
Parsing CPC301T.CBF panics like so:
Error:
× Main thread panicked.
├─▶ at C:\Users\___\.cargo\git\checkouts\openvehiclediag-
│ 39994c2d0095f930\09719e6\CBFParser\src\diag\preparation.rs:139:35
╰─▶ attempt to subtract with overflow
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
So I've raised this issue here in case this is something that CaesarSuite does not handle correctly and instead continues silently (I don't program in C# so not sure if it has a similar Over/underflow detection system :) )
The text was updated successfully, but these errors were encountered:
The library is built without /unsafe so it automatically includes runtime bounds checking that is provided by .net. In the case of a malformed file that leads to this issue, the runtime will make angry noises and exit without memory corruption or losing control flow.
For now, I can't replicate this as I do not have a copy of CPC301T.CBF. I will not be making any changes, but will keep an eye out for this particular case.
Hey!
As you know, my own CBFParser shares a lot of similar code with CaesarSuite.
However, as CBFParser is built in Rust and not C#, I thought I would alert you to a potential bug (Not tested in Caesarsuite), which trips Rusts debug build underflow detection. The code in question is shared between CBFParser and CaesarSuite.
Parsing CPC301T.CBF panics like so:
This panic is caused by this line:
https://github.com/rnd-ash/OpenVehicleDiag/blob/egui_ecu_diag/CBFParser/src/diag/preparation.rs#L139
So essentially,
byte_count & 0xFF
is somehow smaller thanbit_pos
, which triggers the underflow detection, breaking the parser.I noticed that CaesarSuite shares almost identical code here:
https://github.com/jglim/CaesarSuite/blob/main/Caesar/Caesar/DiagPreparation.cs#L246
So I've raised this issue here in case this is something that CaesarSuite does not handle correctly and instead continues silently (I don't program in C# so not sure if it has a similar Over/underflow detection system :) )
The text was updated successfully, but these errors were encountered: