Closed sciguy16 closed 3 years ago
Reproduced with the following panic:
thread '<unnamed>' panicked at 'attempt to subtract with overflow', C:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\rdp-rs-0.1.0\src\core\tpkt.rs:155:80
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>thread '' panicked at '<unnamed>attempt to subtract with overflow' panicked at '', attempt to subtract with overflowC:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\rdp-rs-0.1.0\src\core\tpkt.rs', :C:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\rdp-rs-0.1.0\src\core\tpkt.rs155::15580:80
Related code: https://github.com/citronneur/rdp-rs/blob/master/src/core/tpkt.rs#L155
Occasionally there will be a "memory allocation of 18446744073709551614 bytes failed" message. This number is 2^64-1 and feels like an integer underflow going into a malloc somewhere. Currently unable to reliably reproduce, so it could be triggered by network issues in one of the protocol libraries.