Closed fujiapple852 closed 4 years ago
Invoking Error::to_string results in a stack overflow crash due to a recursive call in the Display::fmt implementation.
Error::to_string
Display::fmt
Example:
#[test] fn test_error_rendering() { assert_eq!("InvalidAlgorithmName", Error::from(ErrorKind::InvalidAlgorithmName).to_string()); }
Results in:
thread 'errors::tests::test_error_rendering' has overflowed its stack fatal runtime error: stack overflow
Simple fix in PR: https://github.com/Keats/jsonwebtoken/pull/117
Invoking
Error::to_string
results in a stack overflow crash due to a recursive call in theDisplay::fmt
implementation.Example:
Results in:
Simple fix in PR: https://github.com/Keats/jsonwebtoken/pull/117